[Bug 917905] Re: netcfg hang bug in autoconfig.c

Ubuntu Foundation's Bug Bot 917905 at bugs.launchpad.net
Wed Jan 18 20:15:30 UTC 2012


The attachment "Push dhcpv6_timeout from debconf into dhclient's config.
Run dhclient with -1 (oneshot) so it will die if it fails to get a
lease." of this bug report has been identified as being a patch.  The
ubuntu-reviewers team has been subscribed to the bug report so that they
can review the patch.  In the event that this is in fact not a patch you
can resolve this situation by removing the tag 'patch' from the bug
report and editing the attachment so that it is not flagged as a patch.
Additionally, if you are member of the ubuntu-reviewers team please also
unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by
Brian Murray.  Please contact him regarding any issues with the action
taken in this bug report.]

** Tags added: patch

-- 
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:
  Confirmed

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