Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 512684 - =sys-kernel/dracut-037-r2 has excessive delay when establishing network interfaces
Summary: =sys-kernel/dracut-037-r2 has excessive delay when establishing network inter...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-07 20:23 UTC by Richard Freeman
Modified: 2023-09-08 09:24 UTC (History)
3 users (show)

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


Attachments
Early boot log. (dracut.txt,334.16 KB, text/plain)
2014-06-07 20:23 UTC, Richard Freeman
Details
emerge --info dracut (dracut.txt,334.16 KB, text/plain)
2014-06-07 20:26 UTC, Richard Freeman
Details
rdsosreport.txt for ip=enp0s10:dhcp (rdsosreport.txt,861.57 KB, text/plain)
2014-06-09 00:03 UTC, Richard Freeman
Details
rdsosreport.txt for ip=eth0:dhcp (rdsosreport.txt,865.36 KB, text/plain)
2014-06-09 00:06 UTC, Richard Freeman
Details
dracut log for net.ifnames=0 ip=eth0:dhcp (dracut.txt.xz,55.78 KB, application/x-xz)
2014-06-09 21:34 UTC, Richard Freeman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Freeman gentoo-dev 2014-06-07 20:23:12 UTC
Created attachment 378436 [details]
Early boot log.

When booting with a nfs root and dhcp dracut takes about 1.5 minutes to set up the network.  This problem did not exist in 034-r4 (I haven't attempted to bisect this yet).  The problem exists both under systemd and whatever init dracut uses otherwise.

The problem appears to be that dracut is trying to set up an IPv6 tunnel, when this is not needed by my configuration, and doesn't appear to be supported by dhclient.

I've attached a log excerpt containing everything up to the pivot (which is ultimately successful).
Comment 1 Richard Freeman gentoo-dev 2014-06-07 20:26:02 UTC
Created attachment 378438 [details]
emerge --info dracut

Note that the emerge --info is generated from a chroot and the host the initramfs is built on, and not the host the initramfs runs on, so be advised that some host-level details may not be accurate.

The initramfs runs on an atom-based ITX system (no persistent storage).
Comment 2 Alexander Tsoy 2014-06-07 22:36:23 UTC
Try adding "ip=enp0s10:dhcp" to the kernel cmdline. Without it dracut creates initqueue jobs for all interfaces.

> Jun 07 10:59:06 localhost dracut-initqueue[204]: /bin/dracut-initqueue@36(): for job in '$hookdir/initqueue/*.sh'
> Jun 07 10:59:06 localhost dracut-initqueue[204]: /bin/dracut-initqueue@37(): '[' -e /lib/dracut/hooks/initqueue/ifup-sit0.sh ']'
> Jun 07 10:59:06 localhost dracut-initqueue[204]: /bin/dracut-initqueue@38(): job=/lib/dracut/hooks/initqueue/ifup-sit0.sh
> Jun 07 10:59:06 localhost dracut-initqueue[204]: /bin/dracut-initqueue@38(): . /lib/dracut/hooks/initqueue/ifup-sit0.sh
Comment 3 Richard Freeman gentoo-dev 2014-06-07 23:31:09 UTC
(In reply to Alexander Tsoy from comment #2)
> Try adding "ip=enp0s10:dhcp" to the kernel cmdline. Without it dracut
> creates initqueue jobs for all interfaces.
> 

Interestingly enough if I use that syntax I get an emergency shell, and ip link shows the ethernet interface is named eth0.

If I instead set ip=eth0:dhcp then I get a loop on initqueue with it trying to run udevadm settle repeatedly (getting that log off the box will be a bit trickier).

If I set ip=192.168.0.10::192.168.0.101:255.255.255.0:mythliv2:enp0s10:none then it boots fine, and fairly quickly (though it seems like I get a bunch of dracut pre-pivot output on the screen AFTER systemd starts running.  The journal seems to bear that out, with there being some service startup like mounts (not root) followed by dracut output.  Maybe it has something to do with how systemd passes along the journal when it pivots or something.
Comment 4 Richard Freeman gentoo-dev 2014-06-07 23:33:29 UTC
One other note, with the static IP assignment shutdown goes MUCH faster.  I think that dracut is trying to do something with sit0 during shutdown otherwise and timing out.
Comment 5 Alexander Tsoy 2014-06-08 23:39:12 UTC
(In reply to Richard Freeman from comment #3)
> (In reply to Alexander Tsoy from comment #2)
> > Try adding "ip=enp0s10:dhcp" to the kernel cmdline. Without it dracut
> > creates initqueue jobs for all interfaces.
> > 
> 
> Interestingly enough if I use that syntax I get an emergency shell, and ip
> link shows the ethernet interface is named eth0.

Very strange. Can you provide rdsosreport.txt? If you will manage to do so, please also add "rd.udev.debug" to the kernel cmdline and maybe "systemd.log_level=debug", but I'm not sure if the latter option will give a useful info.

> If I instead set ip=eth0:dhcp then I get a loop on initqueue with it trying
> to run udevadm settle repeatedly (getting that log off the box will be a bit
> trickier).

You can try "rd.retry=4" option. You will get an emergency shell very quickly and will be able to see the actual name of the network interface.
Comment 6 Richard Freeman gentoo-dev 2014-06-09 00:03:26 UTC
Created attachment 378550 [details]
rdsosreport.txt for ip=enp0s10:dhcp
Comment 7 Richard Freeman gentoo-dev 2014-06-09 00:06:49 UTC
Created attachment 378552 [details]
rdsosreport.txt for ip=eth0:dhcp
Comment 8 Richard Freeman gentoo-dev 2014-06-09 00:07:21 UTC
Oddly enough this time it cycled for both interface names.  I attached the output for both using all the debug settings suggested...
Comment 9 Alexander Tsoy 2014-06-09 05:16:23 UTC
Interesting... Please try the following options: "net.ifnames=0 ip=eth0:dhcp". This could be a race between interface renaming logic in udev and something launched from /sbin/ifup (ip, dhclient, etc..):

[    7.695563] 54.0.0.0 systemd-udevd[207]: IMPORT builtin 'path_id' /lib64/udev/rules.d/80-net-setup-link.rules:5
[    7.696382] 54.0.0.0 systemd-udevd[211]: seq 1336 processed with 0
[    7.697180] 54.0.0.0 systemd-udevd[198]: seq 1334 done with 0
[    7.697912] 54.0.0.0 systemd-udevd[212]: passed -1 bytes to netlink monitor 0xbb5c40
[    7.698654] 54.0.0.0 systemd-udevd[207]: IMPORT builtin 'net_setup_link' /lib64/udev/rules.d/80-net-setup-link.rules:11
[    7.699434] 54.0.0.0 systemd-udevd[198]: seq 1336 done with 0
[    7.700243] 54.0.0.0 systemd-udevd[212]: seq 1337 processed with 0
[    7.701039] 54.0.0.0 systemd-udevd[207]: Config file /usr/lib64/systemd/network/99-default.link applies to device eth0
[    7.701792] 54.0.0.0 systemd-udevd[198]: seq 1337 done with 0
[    7.702704] 54.0.0.0 systemd-udevd[207]: NAME 'enp0s10' /lib64/udev/rules.d/80-net-setup-link.rules:13
[    7.703616] 54.0.0.0 systemd-udevd[198]: seq 1338 queued, 'add' 'ata_port'
[    7.704451] 54.0.0.0 systemd-udevd[207]: RUN '/sbin/initqueue --name ifup-$env{INTERFACE} --unique --onetime /sbin/ifup $env{INTERFACE}' /etc/udev/rules.d/90-net.rules:4
[    7.705175] 54.0.0.0 systemd-udevd[198]: passed 187 bytes to netlink monitor 0xba5540
[    7.705920] 54.0.0.0 systemd-udevd[205]: seq 1335 running
[    7.706760] 54.0.0.0 systemd-udevd[207]: RUN '/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name
' /lib64/udev/rules.d/99-systemd.rules:55
[    7.707593] 54.0.0.0 systemd-udevd[198]: passed 178 bytes to netlink monitor 0xba5540
[    7.708433] 54.0.0.0 systemd-udevd[209]: seq 1338 running
[    7.709231] 54.0.0.0 systemd-udevd[205]: no db file to read /run/udev/data/+scsi_host:host0: No such file or directory
[    7.709971] 54.0.0.0 systemd-udevd[207]: changing net interface name from 'eth0' to 'enp0s10'
[    7.710721] 54.0.0.0 systemd-udevd[198]: seq 1339 queued, 'add' 'scsi'
[    7.711475] 54.0.0.0 systemd-udevd[209]: no db file to read /run/udev/data/+ata_port:ata2: No such file or directory
[    7.712213] 54.0.0.0 systemd-udevd[205]: device 0xbb3df0 has devpath '/devices/pci0000:00/0000:00:0b.0/ata1/host0'
[    7.712971] 54.0.0.0 systemd-udevd[207]: error changing net interface name eth0 to enp0s10: Device or resource busy
>                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[    7.713691] 54.0.0.0 systemd-udevd[198]: passed 184 bytes to netlink monitor 0xba5540
[    7.714490] 54.0.0.0 systemd-udevd[210]: seq 1339 running
[    7.715249] 54.0.0.0 systemd-udevd[209]: device 0xba5540 has devpath '/devices/pci0000:00/0000:00:0b.0/ata2'
[    7.715952] 54.0.0.0 systemd-udevd[205]: no db file to read /run/udev/data/+scsi:host0: No such file or directory
[    7.716685] 54.0.0.0 systemd-udevd[207]: created db file '/run/udev/data/n2' for '/devices/pci0000:00/0000:00:0a.0/net/eth0'
[    7.717424] 54.0.0.0 systemd-udevd[198]: seq 1340 queued, 'add' 'scsi_host'
[    7.718225] 54.0.0.0 systemd-udevd[210]: no db file to read /run/udev/data/+scsi:host1: No such file or directory
[    7.718905] 54.0.0.0 systemd-udevd[209]: passed -1 bytes to netlink monitor 0xbb5440
[    7.719682] 54.0.0.0 systemd-udevd[205]: passed -1 bytes to netlink monitor 0xbb5770
[    7.720380] 54.0.0.0 systemd-udevd[207]: passed -1 bytes to netlink monitor 0xbaa180
[    7.721148] 54.0.0.0 systemd-udevd[198]: seq 1341 queued, 'add' 'ata_link'
[    7.721843] 54.0.0.0 systemd[1]: sys-subsystem-net-devices-enp0s10.device changed dead -> plugged
[    7.722550] 54.0.0.0 systemd-udevd[210]: device 0xbaa730 has devpath '/devices/pci0000:00/0000:00:0b.0/ata2'
[    7.723418] 54.0.0.0 systemd-udevd[209]: seq 1338 processed with 0
[    7.724161] 54.0.0.0 systemd-udevd[205]: seq 1335 processed with 0
[    7.724859] 54.0.0.0 systemd-udevd[207]: seq 1331 processed with -16
[    7.725561] 54.0.0.0 systemd-udevd[198]: passed 185 bytes to netlink monitor 0xba5540
[    7.726293] 54.0.0.0 systemd-udevd[211]: seq 1341 running
[    7.726969] 54.0.0.0 systemd[1]: sys-devices-pci0000:00-0000:00:0a.0-net-eth0.device changed dead -> plugged
Comment 10 Richard Freeman gentoo-dev 2014-06-09 21:34:29 UTC
Created attachment 378608 [details]
dracut log for net.ifnames=0 ip=eth0:dhcp

Your race condition theory may have something to it.  Journal attached for a successful boot with the old interface names.
Comment 11 Alexander Tsoy 2014-06-09 22:37:35 UTC
(In reply to Alexander Tsoy from comment #9)
> Interesting... Please try the following options: "net.ifnames=0
> ip=eth0:dhcp". This could be a race between interface renaming logic in udev
> and something launched from /sbin/ifup (ip, dhclient, etc..):

Err.. No, even initqueue job was not created, so /sbin/ifup was not started as well (RUN execution was skipped). I believe the following patch should fix the issue:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=1ea972174baba40dbc80c51cbfc4edc49764b59b
Comment 12 Alexander Tsoy 2014-06-12 09:21:04 UTC
The patch from comment 11 applies cleanly to systemd-212. Can you test it?
Comment 13 Richard Freeman gentoo-dev 2014-06-12 14:02:45 UTC
(In reply to Alexander Tsoy from comment #12)
> The patch from comment 11 applies cleanly to systemd-212. Can you test it?

net.ifnames=0 ip=eth0:dhcp still works

ip=enp0s10:dhcp still loops
Comment 14 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-03-24 15:27:17 UTC
@Richard: Does the issue still occurs?