Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 284631 - net-misc/dhcpcd-5.1.5 times out whereas 4.0.15 gets a lease
Summary: net-misc/dhcpcd-5.1.5 times out whereas 4.0.15 gets a lease
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 18:16 UTC by John Covici
Modified: 2011-01-04 15:04 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emerge-info.txt,9.73 KB, text/plain)
2009-09-11 18:18 UTC, John Covici
Details
debug output of 4.0.13 (dhcpcd-4.0.13.txt,1.08 KB, text/plain)
2009-09-11 18:26 UTC, John Covici
Details
5.1.0 debug output (dhcpcd-5.1.0.txt,714 bytes, text/plain)
2009-09-11 18:28 UTC, John Covici
Details
tcpdump trace of dhcpcd v4 finding the lease (dhcpcd-v4-dump.txt,73.22 KB, text/plain)
2009-09-26 02:35 UTC, John Covici
Details
dhcpcd v5 trying to find a lease (dhcpcd-v5-dump.txt,2.53 KB, text/plain)
2009-09-26 02:37 UTC, John Covici
Details
Report ClientID sent in debug (0001-Report-ClientID-being-used-in-debug.patch,646 bytes, patch)
2009-09-26 08:06 UTC, Roy Marples
Details | Diff
dhcpcd.conf (dhcpcd.conf,879 bytes, text/plain)
2009-12-30 16:36 UTC, John Covici
Details
conf.d/net (net,1.58 KB, text/plain)
2009-12-30 16:38 UTC, John Covici
Details
output of dhcpcd 5.1.4 with -dB eth2 (temp.txt,1.21 KB, text/plain)
2009-12-31 13:02 UTC, John Covici
Details
dhcpcd 5.1.4 with cmd dhcpcd -dBI '' eth2 (temp.txt,2.53 KB, text/plain)
2010-01-03 09:53 UTC, John Covici
Details
backtrace of dhcpcd 5.1.4 (temp.txt,7.60 KB, text/plain)
2010-01-06 02:01 UTC, John Covici
Details
backtrace of manually compiled dhcpcd (temp.txt,4.11 KB, text/plain)
2010-01-07 00:28 UTC, John Covici
Details
trace without any scripting did not crash, but did not work. (temp.txt,780 bytes, text/plain)
2010-01-27 10:28 UTC, John Covici
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Covici 2009-09-11 18:16:13 UTC
When starting net.eth2 on my system, dhcpcd 5.1.0 times out whereas 4.0.13 succedds.  No config files were changed between the emerge.

Reproducible: Always

Steps to Reproduce:
See above.  I was trying to use dhcpcd to lease a public IP from the ONC of FIOS.  In my conf.d/net  have config_eth2=dhcp

modules_eth2=dhcpcd
I have /etc//dhcpcd.exit-hook which is never executed for the 5.1.0 since the lease is never acquired.1.
2.
3.

Actual Results:  
dhcpcd times out.

Expected Results:  
Lease to be acquired.
Comment 1 John Covici 2009-09-11 18:18:57 UTC
Created attachment 203811 [details]
emerge info
Comment 2 John Covici 2009-09-11 18:26:56 UTC
Created attachment 203815 [details]
debug output of 4.0.13
Comment 3 John Covici 2009-09-11 18:28:31 UTC
Created attachment 203817 [details]
5.1.0 debug output
Comment 4 Roy Marples 2009-09-15 14:38:25 UTC
Try adding the duid option to /etc/dhcpcd.conf
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-24 04:03:14 UTC
reopen with info.
Comment 6 John Covici 2009-09-25 01:59:54 UTC
duid does not work and 5.1.1 still gives timeout error.(In reply to comment #5)
> reopen with info.

Comment 7 Roy Marples 2009-09-25 08:54:16 UTC
Could you attach wireshark traces of dhcpcd-4 working and dhcpcd-5 failing please?
Comment 8 John Covici 2009-09-25 17:56:40 UTC
(In reply to comment #7)
> Could you attach wireshark traces of dhcpcd-4 working and dhcpcd-5 failing
> please?

I have tcpdump here, if that is satisfactory, I can attach traces for both.
Comment 9 Roy Marples 2009-09-25 22:06:23 UTC
Yes, provided they are a full capture like so

tcpdump -s0 -w/tmp/dhcpcd.cap -ieth2
Comment 10 John Covici 2009-09-26 02:35:26 UTC
Created attachment 205255 [details]
tcpdump trace of dhcpcd v4 finding the lease
Comment 11 John Covici 2009-09-26 02:37:14 UTC
Created attachment 205257 [details]
dhcpcd v5 trying to find a lease
Comment 12 Roy Marples 2009-09-26 08:06:04 UTC
Created attachment 205270 [details, diff]
Report ClientID sent in debug

To make this a little more visible, this patch reports the ClientID being sent in debug mode for dhcpcd-5. A DUID is a fancy ClientID.
Comment 13 William Hubbs gentoo-dev 2009-10-29 05:05:08 UTC
John,

is this still an issue with 5.1.3-r1?

Thanks,

William

Comment 14 John Covici 2009-10-29 06:40:07 UTC
(In reply to comment #13)
> John,
> is this still an issue with 5.1.3-r1?
> Thanks,
> William


Yep, issue is still there, no joy.
Comment 15 William Hubbs gentoo-dev 2009-10-29 15:59:32 UTC
Ok, no problem, I'll leave you and Roy to work on it, I just wanted to
see if this was still happening.
Comment 16 Roy Marples 2009-11-10 20:23:25 UTC
(In reply to comment #15)
> Ok, no problem, I'll leave you and Roy to work on it, I just wanted to
> see if this was still happening.

I don't see this as a dhcpcd issue - one version is using a clientid and the other not. This is plainly visible from the packet captures. This is due to a client config issue as neither dhcpcd-4.0.13 or dhcpcd-5.1.3 will send a clientid by default.
Comment 17 William Hubbs gentoo-dev 2009-12-29 21:10:25 UTC
John,

can you test with 5.1.4?  Also, please check your dhcpcd configuration
and verify that you are set up correctly.

You might also want to try using the --noconfmem option for emerge and
go back to the default dhcpcd configuration.

Please let us know whether this works or not.

Also, let us know if 4.0.15 works for you.

Thanks,

William

Comment 18 John Covici 2009-12-30 00:30:37 UTC
(In reply to comment #17)
> John,
> can you test with 5.1.4?  Also, please check your dhcpcd configuration
> and verify that you are set up correctly.
> You might also want to try using the --noconfmem option for emerge and
> go back to the default dhcpcd configuration.
> Please let us know whether this works or not.
> Also, let us know if 4.0.15 works for you.
> Thanks,
> William

5.1.4 does not work, 4.0.15 has been working.  Should there be a difference in the setup between the two?
Comment 19 Roy Marples 2009-12-30 09:46:52 UTC
(In reply to comment #18)
> 5.1.4 does not work, 4.0.15 has been working.  Should there be a difference in
> the setup between the two?

Well you have configured dhcpcd-4 to send a ClientID and dhcpcd-5 to not. That is the difference. Try adding a line to /etc/dhcpcd.conf with just the word clientid on it.
Comment 20 John Covici 2009-12-30 10:34:07 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > 5.1.4 does not work, 4.0.15 has been working.  Should there be a difference in
> > the setup between the two?
> Well you have configured dhcpcd-4 to send a ClientID and dhcpcd-5 to not. That
> is the difference. Try adding a line to /etc/dhcpcd.conf with just the word
> clientid on it.

OK, here is the problem, if I use even 4.0.15 and add the clientid it does not start,  -- I have it normally commented out, but the version 5 adds it anyway and the server does NOT want it.  How do I tell it no?
Comment 21 Roy Marples 2009-12-30 11:37:34 UTC
You remove clientid AND duid from /etc/dhcpcd.conf if you do not want them sent (duid is a clientid also).
Comment 22 John Covici 2009-12-30 12:28:51 UTC
(In reply to comment #21)
> You remove clientid AND duid from /etc/dhcpcd.conf if you do not want them sent
> (duid is a clientid also).
But I have no duid and clientid is commented out, nevertheless apparently v5 sends it anyway.


Comment 23 Roy Marples 2009-12-30 16:11:48 UTC
(In reply to comment #22)
> But I have no duid and clientid is commented out, nevertheless apparently v5
> sends it anyway.

No it doesn't.

I'm about to give up on this - I've already told you what the issue is and how to fix it. But as a last ditch attempt, please attach your /etc/conf.d/net and /etc/dhcpcd.conf
Comment 24 John Covici 2009-12-30 16:36:29 UTC
Created attachment 214637 [details]
dhcpcd.conf
Comment 25 John Covici 2009-12-30 16:38:09 UTC
Created attachment 214638 [details]
conf.d/net
Comment 26 John Covici 2009-12-30 16:41:24 UTC
(In reply to comment #23)
> (In reply to comment #22)
> > But I have no duid and clientid is commented out, nevertheless apparently v5
> > sends it anyway.
> No it doesn't.
> I'm about to give up on this - I've already told you what the issue is and how
> to fix it. But as a last ditch attempt, please attach your /etc/conf.d/net and
> /etc/dhcpcd.conf

As you see -- with this config -- v4.0.15 works and v5 sends the clientid and s does not work.  Thanks for all your efforts.
Comment 27 Roy Marples 2009-12-31 07:16:55 UTC
As root, run this on a console

# pkill dhcpcd
# dhcpcd -dB

Capture the output and attach it here please, once it either times out or gets an address.
Comment 28 John Covici 2009-12-31 13:02:11 UTC
Created attachment 214739 [details]
output of dhcpcd 5.1.4 with -dB eth2

I have the following use flags -zeroconf and compat which is apparently no longer supported in the 5 series.
Comment 29 Roy Marples 2009-12-31 19:20:42 UTC
Now do the same for this command - note the two single quotes at the end.

# pkill dhcpcd
# dhcpcd -dBI ''
Comment 30 John Covici 2010-01-02 16:44:40 UTC
(In reply to comment #29)
> Now do the same for this command - note the two single quotes at the end.
> # pkill dhcpcd
> # dhcpcd -dBI ''


Well, can I put eth2 instead of '' so it doesn't try to broadcast to other interfaces?  Also, which version of dhcpcd do you want me to do this for?

Thanks.
Comment 31 William Hubbs gentoo-dev 2010-01-02 18:02:09 UTC
(In reply to comment #30)
> (In reply to comment #29)
> > Now do the same for this command - note the two single quotes at the end.
> > # pkill dhcpcd
> > # dhcpcd -dBI ''
> Well, can I put eth2 instead of '' so it doesn't try to broadcast to other
> interfaces?  Also, which version of dhcpcd do you want me to do this for?
> Thanks.

I think he needs the output from dhcpcd-5.1.4, like you used in comment #28.

Also, with the 5 series, it shouldn't try to broadcast to any interfaces that are already set up with addresses, so I would suggest using the exact command he gave you.

Thanks,

William
Comment 32 Roy Marples 2010-01-03 08:32:56 UTC
(In reply to comment #30)
> (In reply to comment #29)
> > Now do the same for this command - note the two single quotes at the end.
> > # pkill dhcpcd
> > # dhcpcd -dBI ''
> 
> 
> Well, can I put eth2 instead of '' so it doesn't try to broadcast to other
> interfaces?  Also, which version of dhcpcd do you want me to do this for?

No, you would need to put it afterwards like so:
# pkill dhcpcd
# dhcpcd -dBI '' eth2

It's for dhcpcd-5 only
Comment 33 John Covici 2010-01-03 09:53:16 UTC
Created attachment 214997 [details]
dhcpcd 5.1.4 with cmd dhcpcd -dBI '' eth2
Comment 34 William Hubbs gentoo-dev 2010-01-04 15:32:03 UTC
John,

we need you to attach a backtrace of the previous command.  The document
on the gentoo site that explains how to get one is:
http://www.gentoo.org/proj/en/qa/backtraces.xml

Basically this involves adding "-ggdb" to your cflags then either
"nostrip" or "splitdebug" to features, re-emerging dhcpcd, then using
gdb to run dhcpcd then saving the backtrace to a file and attaching it
to the bug.

Are you comfortable with following the instructions in that document?
Let us know if you have any questions.

Comment 35 John Covici 2010-01-06 02:01:57 UTC
Created attachment 215357 [details]
backtrace of dhcpcd 5.1.4
Comment 36 Roy Marples 2010-01-06 11:21:03 UTC
That backtrace is not useable - there are no funciton calls there.
Can you compile dhcpcd manually like so?

cd /tmp
tar xvjpf /usr/portage/distfiles/dhcpcd-5.1.4.tar.bz2
cd dhcpcd-5.1.4
./configure
CFLAGS=-ggdb make
./dhcpcd -dBI '' eth2
*crash*
gdb ./dhcpcd
> core dhcpcd.core
> bt
Comment 37 John Covici 2010-01-07 00:27:06 UTC
I did what you said, but doesn't look like I got anything.  The core dump came out in my / partition and was only 464k in size.    I did set ulimit -c unlimited before doing this.
(In reply to comment #36)
> That backtrace is not useable - there are no funciton calls there.
> Can you compile dhcpcd manually like so?
> cd /tmp
> tar xvjpf /usr/portage/distfiles/dhcpcd-5.1.4.tar.bz2
> cd dhcpcd-5.1.4
> ./configure
> CFLAGS=-ggdb make
> ./dhcpcd -dBI '' eth2
> *crash*
> gdb ./dhcpcd
> > core dhcpcd.core
> > bt

Comment 38 John Covici 2010-01-07 00:28:35 UTC
Created attachment 215464 [details]
backtrace of manually compiled dhcpcd
Comment 39 William Hubbs gentoo-dev 2010-01-26 16:52:26 UTC
Are there any updates on this bug?

Thanks,

William

Comment 40 Roy Marples 2010-01-27 09:00:57 UTC
Could be related to this upstream ticket
http://roy.marples.name/projects/dhcpcd/ticket/185
Which in turn links to ArchLinux http://bugs.archlinux.org/task/17838
where there is more info.

I've also been sent a lot more stuff privately and hopefully it can be fixed soon.

However, the segfault here is still odd and the backtrace is not useable - nothing dhcpcd related is found. Dunno if that's due to the OP using some kind of wrapper script as indicated at the top and bottom of his output.
Comment 41 John Covici 2010-01-27 10:26:02 UTC
I ran again with no scripting at all excep redirection and it did not crash, or work either -- here is what I got.
Comment 42 John Covici 2010-01-27 10:28:24 UTC
Created attachment 217572 [details]
trace without any scripting did not crash, but did not work.
Comment 43 John Covici 2010-01-27 10:33:40 UTC
I should note that I have a dhcp server on the desktop and in my laptop which is also gentoo, I have v 5.1.4 and it works fine with the dhcpc server on the desktop which is 3.1.2_p1.  So its something with the FIOS server and the dhcpcd client.  Now if I put clientid in 4.0.x, I can make it timeout as well.
Comment 44 Roy Marples 2010-01-27 11:43:35 UTC
Can you try the patch here please?
http://roy.marples.name/projects/dhcpcd/changeset/9eee804aed30995b1dd8f075cae5e6c343289242
Comment 45 Roy Marples 2010-01-27 11:55:35 UTC
Another one here
http://roy.marples.name/projects/dhcpcd/changeset/beffe25d106d2b2452bd0d87b1b249ddb2e22528

If it fails to apply, you may want to try a git snapshot.
Comment 46 John Covici 2010-01-27 15:16:57 UTC
Both changes went in, but no joy.  I did get another crash, but my ulimit was not set, so no core dump, but I tried again and no crash.  Next time I will make sure ulimit is unlimited.  Otherwise same results as always.
Comment 47 Roy Marples 2010-01-29 09:22:08 UTC
It's the crash that puzzles me the most. Can you try running it under valgrind?

valgrind dhcpcd -dBI '' eth2

You may have to emerge glibc with FEATURES="splitdebug" enabled in /etc/make.conf to get valgrind to work though.
Comment 48 William Hubbs gentoo-dev 2010-01-31 22:03:57 UTC
John,

dhcpcd-5.1.5 was just released.  Can you try with that version?

Thanks,

William

Comment 49 John Covici 2010-02-01 15:42:50 UTC
No joy with .5.  Also, I did try .4 with volgrind, but it didn't crash when I tried it.  .5 did not crash, but exhibited the same behavior.
Comment 50 William Hubbs gentoo-dev 2010-03-02 18:17:43 UTC
Hi John,

dhcpcd 5.2.1 just hit portage.  Can you update and try this again?

Thanks,

William
Comment 51 John Covici 2010-03-06 21:07:04 UTC
sorry no joy --exacly the same behavior.
Comment 52 Roy Marples 2010-03-06 23:28:43 UTC
There is a similar discussion on my upstream bug http://roy.marples.name/projects/dhcpcd/ticket/186
Although that is on a VM on a s390, so may not be of any use.
Comment 53 Roy Marples 2010-04-06 12:08:14 UTC
The recently released 5.2.2 has some IP header tweaks which may or may not resolve this issue.
Comment 54 John Covici 2010-04-07 09:17:47 UTC
Sorry, no joy, no crash, but exactly the same behavior
Comment 55 Allan Gottlieb 2010-06-10 22:43:37 UTC
I just tried to install gentoo from the most recent installation CD (8 apr 2010) on amd64 and cannot access the network, dhcpcd fails (times out).

On covici's recommendation, I switched to grml as the boot method and that succeeded.  My machine is a dell latitude e6500 and my router is a linksys running the tomato firmware.
Comment 56 William Hubbs gentoo-dev 2010-06-26 02:23:44 UTC
John,

is this still an issue with 5.2.5?

Thanks,

William

Comment 57 John Covici 2010-07-06 02:24:49 UTC
(In reply to comment #56)
> John,
> is this still an issue with 5.2.5?
> Thanks,
> William

Yep, still the same.
Comment 58 Jeremy Murphy 2010-08-02 07:53:16 UTC
This bug doesn't seem to be getting anywhere even though a fair bit of effort is going in to it.

Roy, you suggested in the stablereq for dhcpcd that this bug is in fact caused by the OP's DHCP server rejecting messages without a clientid: can you succinctly demonstrate that here from the OP's log?  It would be great if we could settle this bug one way or the other.  There is a problem *somewhere*, and if we can show that it's not in dhcpcd, then we can close the bug.  (Right?)  Thanks.
Comment 59 William Hubbs gentoo-dev 2010-08-02 18:04:25 UTC
(In reply to comment #58)
> Roy, you suggested in the stablereq for dhcpcd that this bug is in fact caused
> by the OP's DHCP server rejecting messages without a clientid: can you
> succinctly demonstrate that here from the OP's log?  It would be great if we
> could settle this bug one way or the other.  There is a problem *somewhere*,
> and if we can show that it's not in dhcpcd, then we can close the bug. 
> (Right?)  Thanks.

I agree with this.  If we can show that this is a configuration issue and not an issue with dhcpcd itself, I will close the bug.
Comment 60 Roy Marples 2010-08-02 18:05:56 UTC
If the reporter provided logs are not proof enough then I'm not sure what kind of proof you need. The working one clearly shows a clientid, the non working one clearly shows no clientid.
Comment 61 Jeremy Murphy 2010-08-02 23:52:14 UTC
Roy, I understand that your patience is waning, but please bear with us.  :)  Unfortunately, when I look at the logs (dhcpcd-v[45]-dump.txt) I just see a lot of nonsense, I don't understand what's going on in there.  I'm not sure if William is any more enlightened by them either?  So could you, if possible, please explain to us why/how those logs demonstrate that the server and not the client is malfunctioning.  It would allow us to close the bug as invalid with confidence.

On another note, John's comment (#43) about testing a different server that worked also sounds like a fair argument that the client is not at fault.  Maybe we could find out what version the FiOS server is and confirm that it's faulty.  Just an idea.  I'd rather understand the logs.  :)
Comment 62 Roy Marples 2010-08-03 00:13:29 UTC
Open the logs with an analyzer like wireshark.
You will see that one of the DHCP options that dhcpcd-4.x sends (by default) is a client id. dhcpcd-5 does NOT send this by default.

DHCP servers should NOT require a clientid. However, some do.
From the reporters dhcpcd.conf

# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid

My patience is now at an end. I document, I fix and I demonstrate configuration issues and solutions. But apparently that's not enough anymore.
Comment 63 John Covici 2010-08-03 02:07:33 UTC
OK, the FIOS people changed the server so now the 4.x series does not work and the 5.x series does, and I didn't change the configs at all, so I guess you can close this bug -- sorry for all the trouble.
Comment 64 Jeremy Murphy 2010-08-03 02:57:05 UTC
lol.  (Really.)  Well, John, it's your bug, so it's probably best for you to close it if you feel that it's no longer valid.

Roy, thank you for explaining how to view the log files.
Comment 65 William Hubbs gentoo-dev 2010-08-03 20:01:12 UTC
(In reply to comment #63)
> OK, the FIOS people changed the server so now the 4.x series does not work and
> the 5.x series does, and I didn't change the configs at all, so I guess you can
> close this bug -- sorry for all the trouble.

I am closing this as invalid per your request.

Thanks,

William
Comment 66 Kris Wong 2011-01-04 14:58:02 UTC
I just got updated to 5.2.8, now I consistently get timeouts whereas the previous version worked with no issues. I have not changed the configuration of either version.
Comment 67 Kris Wong 2011-01-04 15:04:37 UTC
I tried uncommenting the "clientid" line in /etc/dhcpcd.conf but this had no affect.