[Bug 2065037] Re: dhcpcd is called before interfaces have carrier causing a 29 seconds boot delay

Stefano 2065037 at bugs.launchpad.net
Wed May 8 09:13:45 UTC 2024


I cannot compare the timing at `initramfs_v9.debug` because I didn't
save `dmesg` output then.

I only have `dmesg_v4.debug` and `dmesg_v10.debug` / `dmesg_v11.debug`.

But you can argue that 5-6 seconds difference is not that big of a deal.

I could also re-run with v9 and save dmesg this time.

Looking at `/var/log/dmesg*` I see the last runs were (from most recent to older, i.e. v11-v10-v9-v8-v7-v6, i.e. `dmesg.log`-`dmesg.0`-`dmesg.1.gz`-`dmesg.2.gz`-`dmesg.3.gz`-`dmesg.4.gz`):
```
v11: [   23.390693] kernel: spl: loading out-of-tree module taints kernel.
v10: [   24.065033] kernel: spl: loading out-of-tree module taints kernel.
v09: [   29.016602] kernel: spl: loading out-of-tree module taints kernel.
v08: [   43.999904] kernel: spl: loading out-of-tree module taints kernel.
v07: [   44.610778] kernel: spl: loading out-of-tree module taints kernel.
v06: [   44.220698] kernel: spl: loading out-of-tree module taints kernel.
```


Especially since we went from 300 seconds -> 45 seconds -> 25 ... 30 seconds right now.

That's already a 10x speedup.

What's weird is that on one system I didn't see anything happening at
all ... the screen just freezes without any output from dhcpcd or
anything else. Maybe it's because on the Laptop I had set `debug` and on
the main Workstation I had `nomodeset` ?

(I'm writing you from this "Main" Workstation, the one that we are
attempting to fix first is my secondary Laptop ... it's easier to
reboot/relogin via SSH rather than having to shutdown my main PC).

Separate Topic ...

Is there a way to configure the logging system so that EVERY boot is a
separate /var/log/dmesg and that /var/log/dmesg always stores the FULL
content since a given boot ? For "small boots" like the ones I just
pasted it works fine, but I think after a while, if the system is
actually used, stays in standby/sleep mode for several days and work in-
between etc, I think the log gets splitted "after a while". Is there a
way to disable this behaviour ? Or else have logs saved by date ? e.g.
/var/log/dmesg.20240508.0, /var/log/dmesg.20240508.1, etc ?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/2065037

Title:
  dhcpcd is called before interfaces have carrier causing a 29 seconds
  boot delay

Status in initramfs-tools package in Ubuntu:
  New

Bug description:
  In automatically encrypted Clevis+Tang unlock of LUKS encrypted device
  (dmcrypt/cryptsetup) - on top of which the ZFS Pool for / resides,
  dhcpcd is used in order to obtain automatically an IP address during
  initramfs boot.

  During this phase, dhcpcd is called before interfaces have carrier
  causing a 29 seconds boot delay.

  Boot delay is currently 45 seconds, instead of the 15 seconds that it
  should.

  BUG Initially reported in:
  https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2064926

  Relevant Logs:
  ```
  dhcpcd-10.0.6 starting
  [...]
  no interfaces have a carrier
  exiting due to oneshot
  dhcpcd exited
  Sleeping 29 seconds before retrying getting a DHCP lease
  dhcpcd-10.0.6 starting
  ```

  A possible workaround would be to manually edit /usr/share/initramfs-tools/scripts/functions
  Changing this:
  `for ROUNDTTT in 30 60 90 120; do`

  To this:
  `for ROUNDTTT in 5 5 5 5; do`

  But the proper solution would be to continuously "scan" the state of
  the Interface (every Second or so), and wait until the interface is
  UP, before deciding to call dhcpcd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/2065037/+subscriptions




More information about the foundations-bugs mailing list