Bug 1976989 - dracut-initqueue slow because lvchange is waiting for dbus
Summary: dracut-initqueue slow because lvchange is waiting for dbus
Keywords:
Status: CLOSED DUPLICATE of bug 1976653
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 34
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-28 17:24 UTC by Jonathan Jacobson
Modified: 2021-06-30 04:54 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-30 04:54:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jonathan Jacobson 2021-06-28 17:24:35 UTC
Description of problem:
Systemd startup takes a lot of time because dracut-initqueue waits 90 seconds while running `lvm lvchange --yes -K -ay` and waiting for dbus to receive message.

Version-Release number of selected component (if applicable):
055-2.fc34

How reproducible:
Each time machine starts

Steps to Reproduce:
1. Reboot or shutdown and start
2. Add rd.debug to boot kernel options (optional)

Actual results:
Slow startup.

Expected results:
Fast startup.

Additional info:

Check who is to blame:

$ systemd-analyze blame | head
1min 36.397s dracut-initqueue.service
      8.008s systemd-cryptsetup@luks\x2d568ab6cb\x2d9d33\x2d4597\x2da627\x2dbc06455ddde9.service
      6.571s NetworkManager-wait-online.service
...

After adding rd.debug to kernel options, check what took it so much time. Notice the 90 seconds gap between "read -r line" and the warning about D-Bus.

$ sudo grep dracut /var/log/boot.log | grep dracut-initqueue
[   12.274789] dracut-initqueue[690]: + echo 'inactive          '\''/dev/vgRoot/tmp'\'' [5.00 GiB] inherit'
[   12.274857] dracut-initqueue[690]: + read -r line
[   12.275103] dracut-initqueue[690]: + info 'inactive          '\''/dev/vgRoot/swap'\'' [23.12 GiB] inherit'
[   12.275178] dracut-initqueue[690]: + echo 'inactive          '\''/dev/vgRoot/swap'\'' [23.12 GiB] inherit'
[   12.275251] dracut-initqueue[690]: + read -r line
[   12.275318] dracut-initqueue[690]: + info 'inactive          '\''/dev/vgRoot/home'\'' [397.62 GiB] inherit'
[   12.275385] dracut-initqueue[690]: + echo 'inactive          '\''/dev/vgRoot/home'\'' [397.62 GiB] inherit'
[   12.275451] dracut-initqueue[690]: + read -r line
[   12.292401] dracut-initqueue[690]: + '[' -n '' ']'
[   12.292885] dracut-initqueue[669]: + for LV in $LVS
[   12.293795] dracut-initqueue[691]: + lvm lvchange --yes -K -ay --ignorelockingfailure --ignoremonitoring --poll n vgRoot/root
[   12.294217] dracut-initqueue[692]: + vinfo
[   12.294302] dracut-initqueue[692]: + read -r line
[  102.432169] dracut-initqueue[692]: + info 'WARNING: D-Bus notification failed: Transport endpoint is not connected'
[  102.432384] dracut-initqueue[692]: + echo 'WARNING: D-Bus notification failed: Transport endpoint is not connected'
[  102.432718] dracut-initqueue[692]: + read -r line
[  102.453717] dracut-initqueue[692]: + '[' -n '' ']'
[  102.454118] dracut-initqueue[669]: + for LV in $LVS
[  102.456269] dracut-initqueue[700]: + lvm lvchange --yes -K -ay --ignorelockingfailure --ignoremonitoring --poll n vgRoot/swap
[  102.458576] dracut-initqueue[701]: + vinfo
[  102.460569] dracut-initqueue[701]: + read -r line
[  102.614460] dracut-initqueue[701]: + '[' -n '' ']'
[  102.614701] dracut-initqueue[669]: + '[' -z 'vgRoot/root
[  102.616387] dracut-initqueue[669]: vgRoot/swap' ']'
[  102.616488] dracut-initqueue[669]: + '[' -n '' ']'
[  102.616542] dracut-initqueue[669]: + '[' '' ']'
[  102.618348] dracut-initqueue[669]: + unset lvmwritten
[  102.618377] dracut-initqueue[669]: + udevadm settle
[  102.620112] dracut-initqueue[669]: + need_shutdown
[  102.620279] dracut-initqueue[669]: + :
[  102.620541] dracut-initqueue[500]: /bin/dracut-initqueue@47(): check_finished

I was told at the #lvm IRC channel that disabling notify_dbus in /etc/lvm/lvm.conf should solve the problem.

Comment 1 Jonathan Jacobson 2021-06-28 17:33:54 UTC
Setting notify_dbus=0 in /etc/lvm/lvm.conf did not solve the problem.

Comment 2 Jonathan Jacobson 2021-06-28 17:44:20 UTC
RPMs installed:

dbus-1.12.20-3.fc34.x86_64
lvm2-2.03.11-1.fc34.x86_64
systemd-248.3-1.fc34.x86_64
dracut-055-2.fc34.x86_64

Comment 3 Ricardo Garcia 2021-06-29 16:52:27 UTC
Probably the same as https://bugzilla.redhat.com/show_bug.cgi?id=1976653

In my case setting notify_dbus=0 in /etc/lvm/lvm.conf and running "dracut -f" as root did fix the issue.

Comment 4 Jonathan Jacobson 2021-06-30 04:54:27 UTC

*** This bug has been marked as a duplicate of bug 1976653 ***


Note You need to log in before you can comment on or make changes to this bug.