[Bug 917905] Re: netcfg hang bug in autoconfig.c
Launchpad Bug Tracker
917905 at bugs.launchpad.net
Mon Feb 6 17:40:12 UTC 2012
This bug was fixed in the package netcfg - 1.68ubuntu9
---------------
netcfg (1.68ubuntu9) precise; urgency=low
* Add a post-base-install hook to detect resolvconf and copy
/run/resolvconf/resolv.conf to outside the target so that when /run
is bind-mounted DNS resolving continues to work. (LP: #926447)
* Apply patch from Alec Warner making netcfg respect netcfg/dhcpv6_timeout
and running dhclient in one-shot mode (-1). (LP: #917905)
-- Stephane Graber <stgraber at ubuntu.com> Mon, 06 Feb 2012 12:05:02 -0500
** Changed in: netcfg (Ubuntu)
Status: Confirmed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netcfg in Ubuntu.
https://bugs.launchpad.net/bugs/917905
Title:
netcfg hang bug in autoconfig.c
Status in “netcfg” package in Ubuntu:
Fix Released
Bug description:
I am working on the Precise alpha (beta?) It appears there is a bug in
netcfg's autoconfig.c.
antarus at goats2 ~ $ rdisc6 eth0
Soliciting ff02::2 (ff02::2) on eth0...
Hop limit : 64 ( 0x40)
Stateful address conf. : No
Stateful other conf. : Yes
Router preference : medium
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Source link-layer address: 00:05:73:A0:00:65
MTU : 1500 bytes (valid)
Prefix : 2620:0:1000:2800::/64
Valid time : 2592000 (0x00278d00) seconds
Pref. time : 604800 (0x00093a80) seconds
from fe80::5:73ff:fea0:65
We set Stateful Other conf which correctly tells netcfg to try dhcpv6.
Sadly we don't have dhcpv6 set up yet, so dhclient will never receive a lease. netcfg/dhcpv6_timeout is normally set for 15s and this should only impose a minor delay for us (until we properly configure our network.) However due to a bug in netcfg_dhcpv6() it hangs forever instead.
in netcfg_dhcpv6(...)
rv = poll_dhcpv6_client(client, interface);
dhcpv6_reader = fdopen(dhcpv6_pipe[0], "r");
while (fgets(l, sizeof(l), dhcpv6_reader) != NULL) {
It looks like the code tries to read from dhcpv6_pipe which is the
stdout of the dhclient process. However the client has not actually
received any leases (since we don't run dhcpv6) so the output it is
expecting will never happen and it will hang on the fgets() call. I
think you should check the value of 'rv' to see if we actually got a
lease. If we didn't then we shouldn't try to read from the pipe.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/917905/+subscriptions
More information about the foundations-bugs
mailing list