Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137800 - dhcpcd 2.0.5 cannot connect to server
Summary: dhcpcd 2.0.5 cannot connect to server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 01:26 UTC by garfungiloops
Modified: 2006-07-12 07:07 UTC (History)
1 user (show)

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


Attachments
Extra debugging (x,7.49 KB, patch)
2006-06-25 11:15 UTC, Roy Marples (RETIRED)
Details | Diff
More debugging and possible fix (x,7.48 KB, patch)
2006-06-26 07:48 UTC, Roy Marples (RETIRED)
Details | Diff
timeout when in a data flood (x,6.64 KB, patch)
2006-06-30 07:09 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description garfungiloops 2006-06-24 01:26:04 UTC
Under some conditions (probably on server side)
dhcpcd 2.0.5 doesn't connects to server 
I have timeout with "Server not responed"
I've tryed many combinations of parameters but nothing helps

However under Windows everything seems to be ok.
Then after downgrading to 2.0.3 it works.

root:/home/bob# emerge --info
Portage 2.1 (default-linux/x86/2006.0, gcc-3.3.6, glibc-2.3.6-r3, 2.6.16-gentoo-                 r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 AMD Athlon(tm) XP 3100+
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shu                 tdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/sha                 re/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/gen                 eric/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.switch.ch/mirror/gentoo/ http://distfiles.gentoo.o                 rg http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_GB.utf8"
LC_ALL=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress                  --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/d                 istfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aac alsa apache2 apm avi berkdb bidi bitmap-fonts cdr cli crypt cup                 s divx4linux dri dvb dvd dvdr dvdread eds emboss encode esd exif faad foomaticdb                  fortran gdbm gif gpm gstreamer gtk gtk2 icc imlib ipv6 isdnlog jack jpeg kde li                 bg++ libwww mad matroska mikmod mjpeg mmx motif mozilla mp3 mpeg ncurses nls npt                 l nptlonly nvidia ogg opengl oss pam pcre pdflib perl png pppd python qt quickti                 me readline real reflection sdl session spell spl sse ssl tcpd truetype truetype                 -fonts type1-fonts udev unicode usb v41 v412 vorbis wxwindows x86 xine xml xmms                  xorg xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS,                  PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 garfungiloops 2006-06-24 01:47:01 UTC
also when i wanted to get some debug info:

root:/home/bob# dhcpcd -v LOG_DEBUG
Segmentation fault
root:/home/bob# dhcpcd -v 0
Segmentation fault

Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-06-24 06:01:20 UTC
Please test with dhcpcd-2.0.7
Comment 3 garfungiloops 2006-06-24 11:47:51 UTC
(In reply to comment #2)
> Please test with dhcpcd-2.0.7
> 

The same problem, however I have a log messages there:
dhcpcd-2.0.7:

root:/home/bob# dhcpcd -v LOG_DEBUG
Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 82.212.39.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 82.212.37.53
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 82.212.37.53
Error, timed out waiting for a valid DHCP server response

root:/home/bob# dhcpcd -HD -v LOG_DEBUG
Info, MAC address = 00:0c:e5:79:1c:c8
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 82.212.39.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 82.212.37.53
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 82.212.37.53
Error, timed out waiting for a valid DHCP server response


dhcpcd-2.0.3 reports
root:/home/bob# dhcpcd -d
dhcpcd: MAC address = XX:XX:XX:XX:XX:XX
dhcpcd: your IP address = 82.212.37.53

and works ok.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-06-24 11:54:23 UTC
Try using the -a option
Comment 5 garfungiloops 2006-06-24 13:12:58 UTC
(In reply to comment #4)
> Try using the -a option
> 

Then it works. Thanks! :-)
(You can switch the bug to resolved I think ...)

The output is:

root:/home/bob# dhcpcd -HDa -v LOG_DEBUG
Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 82.212.39.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 82.212.37.53
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Info, your IP address = 82.212.37.53
Debug, orig hostname = HSI-KBW-082-212-037-053.hsi.kabelbw.de
Info, your hostname = HSI-KBW-082-212-037-053.hsi.kabelbw.de
Info, orig domainname = hsi.kabelbw.de
Debug, your domainname = hsi.kabelbw.de

Debug, about to exec "/etc/dhcpc/dhcpcd.exe /var/lib/dhcpc/dhcpcd-eth0.info new"
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-06-24 15:54:21 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Try using the -a option
> > 
> 
> Then it works. Thanks! :-)
> (You can switch the bug to resolved I think ...)
> 

I could, but I would rather resolve it so that you don't need to disable ARP checking by default. Are you willing to try some patches? Also, it looks like you're getting a public IP address - are you using a cable modem or something? Could you describe the connection?
Comment 7 garfungiloops 2006-06-24 16:02:48 UTC
> Are you willing to try some patches? 

Sure. I'm ready to help.

> Also, it looks like
> you're getting a public IP address - are you using a cable modem or something?
> Could you describe the connection?

Yes. You are right. I'm using usb cable modem.
But the problem is that the problem is not permanent. It appears only from time to time. I guess it depends under some conditions on the server.
And I heard that some other people had the same problem.

So I mean may be tomorrow everything will work without "-a" option ...
Comment 8 Roy Marples (RETIRED) gentoo-dev 2006-06-24 16:10:12 UTC
(In reply to comment #7)
> > Are you willing to try some patches? 
> 
> Sure. I'm ready to help.
> 

OK, I'll knock up a patch with plently of debug lines.
Is it taking a long time before it times out? If you use the -t option (default is 60 seconds) and say specify 360 (5 minutes) does it wait 5 minutes before erroring?

> > Also, it looks like
> > you're getting a public IP address - are you using a cable modem or something?
> > Could you describe the connection?
> 
> Yes. You are right. I'm using usb cable modem.
> But the problem is that the problem is not permanent. It appears only from time
> to time. I guess it depends under some conditions on the server.
> And I heard that some other people had the same problem.
> 
> So I mean may be tomorrow everything will work without "-a" option ...
> 

Shame. I hate intermittent bugs - very hard to fix. But I'll try :)
Comment 9 garfungiloops 2006-06-24 16:26:08 UTC
(In reply to comment #8)

> is 60 seconds) and say specify 360 (5 minutes) does it wait 5 minutes before
> erroring?

That was actually the first thing I've tried :-)
Yes it wait 5 min and then the same error.

Also (may be it will say something for you) I have a wmnd, that's a kind of network traffic monitor. So, in the case of this bad situation but after dhcpcd started it shows permanent traffic about 16k, however in normal case it's about zero (when i'm not using the internet)
Comment 10 Roy Marples (RETIRED) gentoo-dev 2006-06-25 11:15:51 UTC
Created attachment 90126 [details, diff]
Extra debugging

This patch will not fix, but will hopefully show where it's getting stuck.
Comment 11 Roy Marples (RETIRED) gentoo-dev 2006-06-26 07:48:44 UTC
Created attachment 90183 [details, diff]
More debugging and possible fix

This patch supercedes the last one and may actually fix the ARP issue.

Please test and report back
Comment 12 garfungiloops 2006-06-26 14:17:03 UTC
> Please test and report back

I'll certainly test it as soon as I get this situation again.
Currently it works in normal mode.
Comment 13 garfungiloops 2006-06-26 14:49:46 UTC
The current debug_log (with your last patch) if you interesting is:


root:~# dhcpcd -v LOG_DEBUG
Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 85.216.23.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 85.216.22.129
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 85.216.22.129
Info, verified 85.216.22.129 address is not in use
Info, your IP address = 85.216.22.129
Debug, orig hostname = HSI-KBW-085-216-022-129.hsi.kabelbw.de
Debug, about to exec "/etc/dhcpc/dhcpcd.exe /var/lib/dhcpc/dhcpcd-eth0.info new"

However I want to repeat again that I have no that bad situation on the server currently. Probably it will reappear later, then I post the new logs ...
Comment 14 Roy Marples (RETIRED) gentoo-dev 2006-06-27 03:09:45 UTC
(In reply to comment #13)
> However I want to repeat again that I have no that bad situation on the server
> currently. Probably it will reappear later, then I post the new logs ...
> 

Well, that's good as I said that the patch *may* fix it. How often does/did this happen anyway? Once a day, week, month?
Comment 15 Roy Marples (RETIRED) gentoo-dev 2006-06-27 03:09:55 UTC
(In reply to comment #13)
> However I want to repeat again that I have no that bad situation on the server
> currently. Probably it will reappear later, then I post the new logs ...
> 

Well, that's good as I said that the patch *may* fix it. How often does/did this happen anyway? Once a day, week, month?
Comment 16 garfungiloops 2006-06-27 14:06:37 UTC
> Well, that's good as I said that the patch *may* fix it. How often does/did
> this happen anyway? Once a day, week, month?

Normaly once in 2-3 weeks, but we were lucky and I have this situation now.
Here is the log:

  
root:/home/bob# dhcpcd -v LOG_DEBUG
Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 85.216.                        11.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 85.216.10.22
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 85.216.10.22
Error, timed out waiting for a valid DHCP server response
Comment 17 garfungiloops 2006-06-27 14:37:55 UTC
Sorry!

The las LOG was incorrect (I just foegot to make a "qmerge" after applying your patch). Now the LOG_DEBUG is following:

Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 85.216.11.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 85.216.10.22
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 85.216.10.22
Debug, sending probe 1
Debug, done sending probes
Debug, waiting ARP reply
Debug, not ethernet ARP
Debug, waiting ARP reply
Debug, not ethernet ARP
..... and so on until timeout ...
Error, timed out waiting for a valid DHCP server response

Comment 18 Roy Marples (RETIRED) gentoo-dev 2006-06-28 03:00:06 UTC
Roughly how many instances of
Debug, waiting ARP reply
Debug, not ethernet ARP

are you seeing? > 10? > 100? > 1000?
Comment 19 garfungiloops 2006-06-28 15:34:45 UTC
(In reply to comment #18)
> Roughly how many instances of
> Debug, waiting ARP reply
> Debug, not ethernet ARP
> 
> are you seeing? > 10? > 100? > 1000?

I would say about 100.

Comment 20 Roy Marples (RETIRED) gentoo-dev 2006-06-30 07:09:00 UTC
Created attachment 90529 [details, diff]
timeout when in a data flood

OK, this patch should fix arp once and for all. It looks like the problem was it looped constantly looking for ARP replies if there was a constant stream of data.

Please test and report back.
Comment 21 garfungiloops 2006-06-30 13:37:31 UTC
With the last patch it seems to works just perfect. 
Thanks! :-)

root:~# dhcpcd -k
root:~# dhcpcd -v LOG_DEBUG
Info, MAC address = XX:XX:XX:XX:XX:XX
Debug, broadcasting DHCP_DISCOVER
Debug, broadcastAddr option is missing in DHCP server response. Assuming 82.212.39.255
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_OFFER received from  (172.30.22.154)
Debug, broadcasting DHCP_REQUEST for 82.212.39.121
Debug, dhcpIPaddrLeaseTime=3600 in DHCP server response.
Debug, dhcpT1value is missing in DHCP server response. Assuming 1800 sec
Debug, dhcpT2value is missing in DHCP server response. Assuming 3150 sec
Debug, DHCP_ACK received from  (172.30.22.154)
Debug, broadcasting ARPOP_REQUEST for 82.212.39.121
Debug, arpCheck: timeout - flood?
Info, verified 82.212.39.121 address is not in use
Info, your IP address = 82.212.39.121
Debug, orig hostname = HSI-KBW-082-212-039-121.hsi.kabelbw.de
Debug, about to exec "/etc/dhcpc/dhcpcd.exe /var/lib/dhcpc/dhcpcd-eth0.info new"
Comment 22 Roy Marples (RETIRED) gentoo-dev 2006-06-30 16:44:58 UTC
(In reply to comment #21)
> With the last patch it seems to works just perfect. 
> Thanks! :-)

OK, so it seems to have fixed the problem - excellent.
However, as it's such a corner case I'll leave the bug open for a week. So thats the timeframe - keep me updated.

When a week passes I'll put out a new version :)
Comment 23 Roy Marples (RETIRED) gentoo-dev 2006-07-12 07:07:22 UTC
Fixed in dhcpcd-2.0.8