Skip to contentSkip to conversation

root=dhcp broke

DISCUSSION Warren Togami 3 participants 10 messages Jun 17, 2009 – Jun 18, 2009 8 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 3 lines · Warren Togami

After that latest patch set, simply "root=dhcp" no longer boots.

"root=dhcp ip=dhcp" fails as well.

What's the contents of your dhcp root path? root=dhcp tests in the suite all pass.

Quoted 6 lines

Warren

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to a message not in the archive
Quoted 7 lines · Seewer Philippe
Quoted 3 lines · Warren Togami

After that latest patch set, simply "root=dhcp" no longer boots.

"root=dhcp ip=dhcp" fails as well.

What's the contents of your dhcp root path? root=dhcp tests in the suite all pass.

Harald saw the problem. The precedent for DHCP root= or root-path= syntax for NFSv3 is as documented here:

http://sourceforge.net/apps/trac/dracut/wiki/commandline

Begins with IP address, not "nfs:". "nfs4:" prefix is true of NFSv4, but "nfs:" would be a new invention. Harald is now fixing this.

Warren
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive

Harald applied fixes. Now with root=dhcp it is failing to boot because dhclient is segfaulting.

ifup.eth0.561.out contains:
...
+ ip=
+ '[' -z '' ']'
+ do_dhcp
+ dhclient -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.eth0.pid -lf /tmp/dhclient.eth0.lease eth0
/sbin/ifup: line 26: 563 Segmentation fault
...

dhclient.eth0.564.out contains only:
+ '[' -f /tmp/net..up ']'
+ netif=eth0
+ case $reason in
+ ip link set eth0 up
+ exit 0

dhclient.eth0.567.out contains:
+ '[' -f /tmp/net..up ']'
+ netif=eth0
+ case $reason in
+ setup_interface
... (and it sets it up properly via DHCP)...
... (but eth0 is not configured by the time it hits the shell)...

The following is a segfault at the emergency_shell when I have manually run "dhclient eth0".

Program terminated with signal 11, Segmentation fault.
#0 0x0806fd4d in add_timeout (when=0x4a3986b2, where=0x8056a20 <send_discover>, what=0x95fc5d0, ref=0, unref=0) at dispatch.c:143
143 q -> when . tv_sec = when -> tv_sec;
(gdb) bt

#0  0x0806fd4d in add_timeout (when=0x4a3986b2, where=0x8056a20 <send_discover>, what=0x95fc5d0, ref=0, unref=0) at dispatch.c:143
#1  0x08056dd7 in state_init (cpp=0x95fc5d0) at dhclient.c:1213
#2  0x080580f8 in bind_lease (client=0x95fc5d0) at dhclient.c:1494
#3  0x08058b72 in dhcpack (packet=0x95fcef8) at dhclient.c:1460
#4  0x080547cf in dhcp (packet=0x95fcef8) at dhclient.c:1693
#5  0x0807ae63 in do_packet (interface=0x95d4608, packet=0xbfdf25a4, len=300, from_port=17152, from={len = 4, iabuf = "\254\37d\376a)\n\b\2\0\0\0\0\0\0"}, hfrom=0xbfdf35ba) at options.c:3732
#6  0x0806db8f in got_one (h=0x95d4608) at discover.c:1393
#7  0x080a763e in omapi_one_dispatch (wo=0x0, t=0xbfdf39c8) at dispatch.c:473
#8  0x0806fed0 in dispatch () at dispatch.c:92
#9  0x0805aa2c in main (argc=2, argv=0xbfdf3c54) at dhclient.c:971

Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive

https://bugzilla.redhat.com/show_bug.cgi?id=506626

Filed the dhclient segfault here. I've been trying to debug this for the past 5 hours straight. I'm perplexed.

Backing out to 1a945a576c0016c47f983d27727443ac33c5b6a8 prior to Phillippe's patch series dhclient does not crash.

dhcpd.conf contains:
option root-path "172.31.100.254:/opt/ltsp/i386";

Here's something curious...

sh-4.0# dhclient -v eth0
Internet Systems Consortium DHCP Client 4.1.0 Copyright 2004-2008 Internet Systems Consortium. All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 172.31.100.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 172.31.100.254
DHCPDECLINE on eth0 to 255.255.255.255 port 67
dhclient[616]: segfault at 4a39a266 ip 0806fd4d sp bfa4eed0 error 4 in dhclient[8048000+84000]

DHCPDECLINE? Haven't seen that before.

Warren Togami
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#17 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive

Warren Togami wrote:
[snip]

Quoted 7 lines

dhclient.eth0.567.out contains:
+ '[' -f /tmp/net..up ']'
+ netif=eth0
+ case $reason in
+ setup_interface
... (and it sets it up properly via DHCP)...
... (but eth0 is not configured by the time it hits the shell)...

Interface configuration is delegated to netroot now. So dhclient-script only writes config-files and does not actually configure the interface.

Regards,
Philippe
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive
Quoted 5 lines · Warren Togami

https://bugzilla.redhat.com/show_bug.cgi?id=506626

Filed the dhclient segfault here. I've been trying to debug this for the past 5 hours straight. I'm perplexed.

Backing out to 1a945a576c0016c47f983d27727443ac33c5b6a8 prior to Phillippe's patch series dhclient does not crash.

That is weird. I have no problems at all with isc-dhclient-V3.1.1

Question: Does it segfault in the test-suites as well?

Quoted 21 lines

dhcpd.conf contains:
option root-path "172.31.100.254:/opt/ltsp/i386";

Here's something curious...

sh-4.0# dhclient -v eth0
Internet Systems Consortium DHCP Client 4.1.0 Copyright 2004-2008 Internet Systems Consortium. All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/52:54:00:12:34:56
Sending on LPF/eth0/52:54:00:12:34:56
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 172.31.100.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 172.31.100.254
DHCPDECLINE on eth0 to 255.255.255.255 port 67
dhclient[616]: segfault at 4a39a266 ip 0806fd4d sp bfa4eed0 error 4 in dhclient[8048000+84000]

Quoted 1 line

DHCPDECLINE? Haven't seen that before.

See here: http://www.freesoft.org/CIE/RFC/2131/25.htm

Regards,
Philippe
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#12 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive
Quoted 8 lines · Seewer Philippe
Quoted 5 lines · Warren Togami

https://bugzilla.redhat.com/show_bug.cgi?id=506626

Filed the dhclient segfault here. I've been trying to debug this for the past 5 hours straight. I'm perplexed.

Quoted 7 lines
Quoted 2 lines

Backing out to 1a945a576c0016c47f983d27727443ac33c5b6a8 prior to Phillippe's patch series dhclient does not crash.

That is weird. I have no problems at all with isc-dhclient-V3.1.1

Question: Does it segfault in the test-suites as well?

WORKSFORME
fine with: dhclient-4.1.0-20.fc11.x86_64
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive
Quoted 12 lines · Harald Hoyer
Quoted 11 lines · Seewer Philippe
Quoted 7 lines · Warren Togami

https://bugzilla.redhat.com/show_bug.cgi?id=506626

Filed the dhclient segfault here. I've been trying to debug this for the past 5 hours straight. I'm perplexed.

Backing out to 1a945a576c0016c47f983d27727443ac33c5b6a8 prior to Phillippe's patch series dhclient does not crash.

Quoted 7 lines
Quoted 4 lines

That is weird. I have no problems at all with isc-dhclient-V3.1.1

Question: Does it segfault in the test-suites as well?

WORKSFORME
fine with: dhclient-4.1.0-20.fc11.x86_64

I've not been able to reproduce the segfault.

But I've got the dhcp decline in vanilla isc dhclient-4.1.

Apparently dhclient-4.1 calls the dhclient-script twice with reason BOUND. I have no idea why. But my dhclient-script has (sadly) a small bug, which causes the dhclient to loop endlessly and dhclient always declining.

Patch below fixes this, but I have absolutely no idea why.

modules.d/40network/dhclient-script +0 -0
index 80ab54c..4153eb8 100755
@@ -43,12 +43,12 @@ if getarg rdnetdebug ; then
    set -x

fi

-# Huh? Interface configured?
-[ -f "/tmp/net.$netif.up" ] && exit 0
-
# We already need a set netif here
netif=$interface

+# Huh? Interface configured?
+[ -f "/tmp/net.$netif.up" ] && exit 0
+
case $reason in
PREINIT)
ip link set $netif up
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw

Re: root=dhcp dhclient segfaulting on F-11

In reply to a message not in the archive

The Bug causing dhclient to recall BIND has been identified:
dhclient-script runs with #!/bin/sh -e, causing setup_interface
to fail if no hostname is provided by dhcp as it is the last statement in that function.

Please apply the patch below which removes -e

modules.d/40network/dhclient-script +1 -1
index 4153eb8..f86c258 100755
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 

setup_interface() {
ip=$new_ip_address
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html