Dhcpcd prioritizes (unconnnected) LAN adapter over WLAN, causing a 5 min boot delay

Bug #2062501 reported by Albert Weichselbraun
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
aoetools (Ubuntu)
Confirmed
Undecided
Unassigned
initramfs-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After upgrading to Ubuntu 24.04, dhcpcd spends over five minutes trying to obtain a DHCP lease for an unconnected LAN adapter during startup.
Only after this process times out, the boot process resumes.

Consequently, startup works flawlessly, if the laptop is connected to the LAN, but takes five additional minutes, if that's not the case.

Please find below the console output (obtained by pressing "ESC" during bootup)

Setting ip link enp0s... up
Setting ip link enx0... up
dhcpcd-10.0.6 starting
dev: loaded udev
no interfaces have a carrier
exiting due to oneshot
Sleeping 30 seconds before retrying getting a DHCP lease
dhcpcd-10.0.6 starting
dev: loaded udev
no interfaces have a carrier
exiting due to oneshot
Sleeping 60 seconds before retrying getting a DHCP lease
...
dhcpcd-10.0.6 starting
dev: loaded udev
no interfaces have a carrier
exiting due to oneshot
Sleeping 120 seconds before retrying getting a DHCP lease

After multiples tries to obtain a DHCP lease (which take approximately five minutes) the standard boot process resumes.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: initramfs-tools 0.142ubuntu25
ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1
Uname: Linux 6.8.0-22-generic x86_64
ApportVersion: 2.28.1-0ubuntu1
Architecture: amd64
CasperMD5CheckMismatches: ./preseed/ubuntu.seed ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-firmware-535-535.113.01_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/xserver-xorg-video-nvidia-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-compute-utils-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-kernel-source-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-driver-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-utils-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/nvidia-kernel-common-535_535.113.01-0ubuntu3_amd64.deb ./pool/restricted/n/nvidia-graphics-drivers-535/libnvidia-gl-535_535.113.01-0ubuntu3_i386.deb
CasperMD5CheckResult: fail
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 19 07:40:31 2024
InstallationDate: Installed on 2023-12-03 (138 days ago)
InstallationMedia: Ubuntu Legacy 23.10 "Mantic Minotaur" - Release amd64 (20231010)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: Upgraded to noble on 2024-04-18 (1 days ago)

Revision history for this message
Albert Weichselbraun (albert-weichselbraun) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thank you for taking the time to report this bug and contributing to Ubuntu. Is the LAN adapter the only network device on your machine? What are you kernel cmdline parameters?

Revision history for this message
Albert Weichselbraun (albert-weichselbraun) wrote :

The machine has a Wifi and a LAN adapter:

<snip cmd="lspci |grep -i net">
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)
01:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
</snip>

Kernel cmdline parameters:

<snip cmd="cat /proc/cmdline">
BOOT_IMAGE=/vmlinuz-6.8.0-22-generic root=UUID=50fe4fec-39c1-4ec0-8401-328516b4fa86 ro quiet splash i915.enable_psr=0
</snip>

Revision history for this message
Benjamin Drung (bdrung) wrote :

I see no ip parameter on the kernel cmdline. So dhcpcd should not run in the initramfs at all. Can you boot with `debug` and share the /run/initramfs/initramfs.debug then?

Revision history for this message
Albert Weichselbraun (albert-weichselbraun) wrote :

Sure - please find enclosed /run/initramfs/initramfs.debug

It looks like the problem is caused by `configure_networking` from `/usr/share/initramfs-tools/scripts/functions` which is called due to the installed `aoetools` package (which calls `configure_networking` in `/usr/share/initramfs-tools/scripts/local-top/aoe`).

Revision history for this message
Albert Weichselbraun (albert-weichselbraun) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks for the analysis. My conclusion is: initramfs-tools works as designed. The culprit is aoetools here.

Uninstalling aoetools would be one option. If that is not an option, aoetools should become smarter and only call `configure_networking` in case it needs an ATA over Ethernet device for booting. If the root UUID can be found locally, no network configuration is needed.

Revision history for this message
Albert Weichselbraun (albert-weichselbraun) wrote :

Thank you for helping debug this issue. I concur with your assessment.
- this should be handled by aoetools (probably similar to the way nfs versus nfsroot is handled).

Revision history for this message
Benjamin Drung (bdrung) wrote :

Thanks. Then I mark this bug as Invalid for initramfs-tools.

Changed in initramfs-tools (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in aoetools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.