lvm2: vgcfgbackup in postinst takes several minutes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The postinst for lvm2 includes a call to vgcfgbackup; in the version included in eoan 2.03.02-2ubuntu4 (and 2.03.02-2ubuntu3 before it), this command takes several minutes to run when invoked in an schroot as happens when a building a package with sbuild that ends up pulling lvm2 as part of its build dependency chain. An example package with lvm2 in its build depends is rsnapshot, but this behavior was seen with a build of glibc. Some notes:
- this behavior is NOT seen with the version of lvm2 in disco.
- this happens in bionic with a 4.15 kernel and disco with a 5.0 kernel (different hosts, so different sets of block devices)
- this happens regardless of whether the host is currently using logical volumes or not
Here's the time difference between running the disco version and the eoan version:
(disco-
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
real 0m0.204s
user 0m0.014s
sys 0m0.010s
(eoan-amd64)
WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda2 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda3 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb2 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb3 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdc not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdc1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdd not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdd1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sde not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sde1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sde2 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda2 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sda3 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb2 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdb3 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdc1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sdd1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sde1 not initialized in udev database even after waiting 10000000 microseconds.
WARNING: Device /dev/sde2 not initialized in udev database even after waiting 10000000 microseconds.
real 4m11.405s
user 0m0.470s
sys 0m0.576s
/proc/mounts in the schroot:
(eoan-amd64)
eoan-amd64 / overlay rw,relatime,
proc /proc proc rw,nosuid,
sysfs /sys sysfs rw,nosuid,
udev /dev devtmpfs rw,nosuid,
devpts /dev/pts devpts rw,nosuid,
/dev/sda2 /home ext4 rw,relatime,
/dev/sda2 /tmp ext4 rw,relatime,
tmpfs /run/shm tmpfs rw,relatime 0 0
/dev/sda2 /scratch ext4 rw,relatime,
/dev/sdc1 /srv/work ext4 rw,relatime,
strace of vgcfgbackup is attached
tags: | added: rls-ee-incoming |
Changed in lvm2 (Ubuntu): | |
assignee: | nobody → Łukasz Zemczak (sil2100) |
Changed in lvm2 (Ubuntu): | |
assignee: | Łukasz Zemczak (sil2100) → nobody |
status: | New → Confirmed |
tags: |
added: rls-ee-notfixing removed: rls-ee-incoming |
I tested this on an virtual machine running Eoan and did not notice vgcfgbackup taking as much time as it doesn in an schroot.
bdmurray@ clean-eoan- amd64:~ $ sudo time vgcfgbackup 1411minor) pagefaults 0swaps
0.00user 0.00system 0:00.02elapsed 37%CPU (0avgtext+0avgdata 10848maxresident)k
3584inputs+0outputs (0major+