ath/wpa_supplicant/dhclient lost connection

Samuel J. Greear sjg at evilcode.net
Wed Oct 27 15:39:43 PDT 2010


On Wed, Oct 27, 2010 at 10:31 AM, Matthias Schmidt
<matthias at dragonflybsd.org> wrote:
> Hi,
>
> * Samuel J. Greear wrote:
>>
>> Recent master kernel -and- world?
>
> I'm running DragonFly v2.7.3.1236.g0b684-DEVELOPMENT #1: Tue Oct  5
> 22:26:32 CEST 2010.  No time yet to update the box to latest master.
> Its an old UP machine, so building world/kernel takes ages (even with
> quick).
>
>> If this is seen again, truss or ktrace output of dhclient would be helpful.
>
> I attached truss and you see thousands of poll messages:
>
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
> poll(0xbfbff7e4,0x2,0x474a0)                     = 1 (0x1)
> gettimeofday(0xbfbff7bc,0x0)                     = 0 (0x0)
>
> This sequence keeps repeating forever.
>
> More debugging tomorrow, I'm currently short of time.
>
> Cheers
>
>        Matthias
>

I patched a known infinite loop and another possible infinite loop on Sept. 9.

http://gitweb.dragonflybsd.org/dragonfly.git/commit/a05d48e6c7b12ad7abca8e3a3264413ac6f54003
http://gitweb.dragonflybsd.org/dragonfly.git/commit/db2a08265dc67538d417f14ccdc9fdef6fb0d60b

So if it's newer than that there's definitely still a problem. Note
that there are two poll(2) loops in dhclient, make sure you're looking
at the right one if you dig into it. Probably it is the one in
dispatch.c returning -1 and EAGAIN, the question is why.

It looks like it would be much more efficient, also, if we moved the
call to time() behind the error check. (There went my attempt at humor
for the day).

Sam






More information about the Bugs mailing list