Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947115 - sys-kernel/gentoo-kernel-6.6.7: causes double-mounting with sys-apps/util-linux-2.40.2 (mounts already mounded paths with -a)
Summary: sys-kernel/gentoo-kernel-6.6.7: causes double-mounting with sys-apps/util-lin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-28 13:48 UTC by Klaus Ethgen
Modified: 2025-02-02 17:07 UTC (History)
3 users (show)

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


Attachments
mountinfo v62 (mi1-6.6.62-gentoo-dist,1.82 KB, text/plain)
2025-01-10 21:46 UTC, Klaus Ethgen
Details
mountinfo v67 (mi1-6.6.67-gentoo-dist,1.92 KB, text/plain)
2025-01-10 21:47 UTC, Klaus Ethgen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Ethgen 2024-12-28 13:48:53 UTC
I am not sure if that is an error of sys-apps/util-linux or sys-kernel/gentoo-kernel-bin-6.6.67 which was installed today triggering the reboot.

However, I have some mounts (/var/lib/bacula in this case) mounted below /var. When I do a mount -a, it will always overmount /var even though it is already mounted. After that /var/lib/bacula is not available anymore.

Reproducible: Always

Steps to Reproduce:
> mount
proc on /proc type proc (rw,relatime,gid=4,hidepid=invisible)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=10240k,nr_inodes=1518111,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,inode64)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)
/dev/mapper/sysvg-lv_root on / type btrfs (rw,relatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=5,subvol=/)
/dev/mapper/sysvg-lv_root on /usr type btrfs (rw,nodev,noatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=257,subvol=/usr)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)
/dev/mapper/sysvg-lv_root on /usr type btrfs (rw,nodev,noatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=257,subvol=/usr)
/dev/mapper/sysvg-lv_root on /var type btrfs (rw,nosuid,relatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=261,subvol=/var)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,size=100k,mode=755,inode64)
tmpfs on /var/tmp/portage type tmpfs (rw,nosuid,nodev,relatime,size=4194304k,nr_inodes=1048576,mode=755,inode64)
/dev/mapper/sysvg-lv_root on /usr type btrfs (rw,nodev,noatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=257,subvol=/usr)
/dev/mapper/sysvg-lv_root on /var type btrfs (rw,nosuid,relatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=261,subvol=/var)
/dev/mapper/sysvg-lv_root on /usr type btrfs (rw,nodev,noatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=257,subvol=/usr)
/dev/mapper/sysvg-lv_root on /var type btrfs (rw,nosuid,relatime,lazytime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=261,subvol=/var)

> mount -va
/                        : ignored
none                     : ignored
none                     : ignored
/proc                    : already mounted
/tmp                     : already mounted
/usr                     : successfully mounted
/var                     : successfully mounted
/home                    : ignored
/misc                    : ignored
/etc/secure              : ignored
/var/lib/bacula          : ignored
/root                    : ignored
/media                   : already mounted
/var/tmp/portage         : already mounted
/dos                     : ignored
/cdrom                   : ignored
/home/klaus/ifr          : ignored
Actual Results:  
/var (and /usr) is mounted more than once.

Expected Results:  
Not mount /var (and /usr) again and again.
Comment 1 Klaus Ethgen 2024-12-28 13:58:21 UTC
I checked. It is a bug of sys-kernel/gentoo-kernel-bin-6.6.67. Please reroute
Comment 2 Nowa Ammerlaan gentoo-dev 2024-12-28 14:50:45 UTC
(In reply to Klaus Ethgen from comment #1)
> I checked. It is a bug of sys-kernel/gentoo-kernel-bin-6.6.67. Please reroute

Please clarify what you checked. Does this not happen in older versions? Which versions?
Comment 3 Klaus Ethgen 2024-12-28 14:56:55 UTC
I checked with kernel sys-kernel/gentoo-kernel-bin-6.6.62, where the bug does not appear.

Currently I run that kernel now and did mask version 6.6.67 locally.
Comment 4 Mike Gilbert gentoo-dev 2024-12-28 15:26:50 UTC
Is /etc/mtab a regular file or a symlink?

Also, it may help to compare /proc/self/mountinfo with each kernel version.
Comment 5 Klaus Ethgen 2024-12-28 18:14:18 UTC
lrwxrwxrwx 1 root root 19 28. Dez 14:55 /etc/mtab -> ../proc/self/mounts

I cannot compare it anymore as I already purged the broken kernel.

If it is really needed, I have to reinstall it again and boot the system. However, that is my main system and boot takes several minutes so I want to avoid again two reboots. (It took me half the day to even narrow the problem already.)
Comment 6 Klaus Ethgen 2025-01-10 21:46:40 UTC
Created attachment 916261 [details]
mountinfo v62
Comment 7 Klaus Ethgen 2025-01-10 21:47:01 UTC
Created attachment 916262 [details]
mountinfo v67
Comment 8 Klaus Ethgen 2025-01-10 21:48:23 UTC
I added the both mountinfos direct after boot.

The different in my eyes, it is already double mounted and using device /dev/dm-3 instead of /dev/mapper/sysvg-lv_root.
Comment 9 Klaus Ethgen 2025-02-02 17:07:48 UTC
Version 6.6.74-gentoo-dist fixes the issue.