"dhclient -6 "daemon process exits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

"dhclient -6 "daemon process exits

Zhiqiang Liu
Hi everybody,
        env: dhclient-4.2.5, kernel 3.10
        In the client, "dhclient -d -q -6 -N -pf ** -lf ** eth0" command is
used to obtain IPv6 address from server. For testing basic funcs, the valid_lft
and preferred_lft are set to 60 seconds. At the begining, dhclient can request
a IPv6 addr successfull. However, there may be something wrong with server, the
dhclient cannot receive the response from server anymore. In this situation,
the dhclient will send serveal Renew and Rebind messages to the server until the
lease expires, and then restart the address application process.
Howver, the dhclient daemon process exits (status 1) abnormally.
        This is an accidental problem.
Process:
        In dhc6_retrans_advance func, client->RT is set to 0 in the following case,
        if (elapsed.tv_sec >= client->MRD) {
                client->RT = client->MRD - elapsed_after_RT.tv_sec;
                client->RT = client->RT * 100 - elapsed_after_RT.tv_usec / 10000;
                if (client->RT < 0)
                        client->RT = 0;
        }
        Then, dhc6_retrans_advance in do_refresh6 func advances the DHCPv6 retransmission
state once, which is depended on the last client state.
        do_refresh6 code:
                add_timeout(&tv, do_refresh6, client, NULL, NULL);
                dhc6_retrans_advance(client);
        In dhc6_retrans_advance, the RT for each subsequent message transmission is based
on the previous value of RT as follows,
                client->RT += client->RT + dhc6_rand(client->RT);
        If the last client->RT is equal to 0, the dhc6_rand will call log_fatal("Impossible
condition at %s:%d.", MDL), in which the daemon process will exit with status 1.

Question:
        dhc6_retrans_advance advances the DHCPv6 retransmission state based on the last state.
What conditions will lead to client->RT? I have tried to analyze the dhc6_retrans_advance func,
but I cannot give the valid conclusion.

Log info:

87468 Mar  7 03:09:15 host-192-168-60-251 dhclient[718]: PRC: Renewing lease on eth0.
87469 Mar  7 03:09:15 host-192-168-60-251 dhclient[718]: XMT: Renew on eth0, interval 10510ms.
87471 Mar  7 03:09:25 host-192-168-60-251 dhclient[718]: XMT: Renew on eth0, interval 20310ms.
87474 Mar  7 03:09:46 host-192-168-60-251 dhclient[718]: XMT: Renew on eth0, interval 20170ms.
87479 Mar  7 03:10:06 host-192-168-60-251 dhclient[718]: PRC: Rebinding lease on eth0.
87480 Mar  7 03:10:06 host-192-168-60-251 dhclient[718]: XMT: Rebind on eth0, interval 10210ms.
87481 Mar  7 03:10:16 host-192-168-60-251 dhclient[718]: XMT: Rebind on eth0, interval 20790ms.
87502 Mar  7 03:10:37 host-192-168-60-251 NetworkManager[624]: <info>  (eth0): DHCPv6 state changed bound -> unknown
87503 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: PRC: Address 2001:db8:a583:4:245e:fd17:1f58:2476 depreferred.
87504 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: XMT: Rebind on eth0, interval 00ms.
87505 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: Impossible condition at dhc6.c:318.
87506 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]:
87507 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: This version of ISC DHCP is based on the release available
87508 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: on ftp.isc.org.  Features have been added and other changes
87509 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: have been made to the base software release in order to make
87510 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: it work better with this distribution.
87511 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]:
87512 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: Please report for this software via the CentOS Bugs Database:
87513 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]:    http://bugs.centos.org/
87514 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]:
87515 Mar  7 03:10:37 host-192-168-60-251 dhclient[718]: exiting.
87516 Mar  7 03:10:37 host-192-168-60-251 NetworkManager[624]: <info>  (eth0): DHCPv6 client pid 718 exited with status 1
87517 Mar  7 03:10:37 host-192-168-60-251 NetworkManager[624]: <info>  (eth0): DHCPv6 state changed unknown -> done

Regards,
Zhiqiang Liu

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users