LXC with r/w sys and udev keeps trying to unmount bind mounts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt | ||
Vivid |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I recently hit ENOSPC which turned out to be the result of various syslogs from the current and previous boots totalling up to 30G.
They were filled with messages like
Apr 15 11:22:35 vivid systemd[1]: Unit var-lib-
Apr 15 11:22:35 vivid systemd[1]: Unmounting /var/lib/
Apr 15 11:22:35 vivid umount[31795]: umount: /var/lib/
Apr 15 11:22:35 vivid umount[31795]: (In some cases useful info about processes that
Apr 15 11:22:35 vivid umount[31795]: use the device is found by lsof(8) or fuser(1).)
Apr 15 11:22:35 vivid systemd[1]: var-lib-
Apr 15 11:22:35 vivid systemd[1]: Failed unmounting /var/lib/
Apr 15 11:22:35 vivid systemd[1]: Unit var-lib-
Apr 15 11:22:35 vivid systemd[1]: Unmounting /var/lib/
Apr 15 11:22:35 vivid systemd[1]: Unmounted /var/lib/
Apr 15 11:22:35 vivid systemd[1]: Unit var-lib-
looping constantly for the duration of any builds in sbuild.
Why is systemd trying to do this?
SRU TEST CASE:
--------------
- Create a vivid container, and set "lxc.aa_profile = unconfined" and "lxc.mount.auto = sys:rw cgroup" in its config. (Note that the latter is not supported!)
- Start the container
- Run "mount -v -o bind /bin /mnt"
- Observe that it doesn't stay mounted, but "sudo journalctl" says
Mai 06 09:17:08 test systemd[1]: Unit mnt.mount is bound to inactive unit dev-sda3.device. Stopping, too.
Mai 06 09:17:08 test systemd[1]: Unmounting /mnt...
Mai 06 09:17:08 test systemd[1]: Unmounted /mnt.
- With the fixed package bind mounts stay mounted.
REGRESSION POTENTIAL: This could potentially break cleanup of stale mount points of either hotplug devices which disappear, or media which get forcefully ejected (like CDs). Testing should include that these still work.
laney@vivid> apt-cache policy systemd
systemd:
Installed: 219-7ubuntu1
Candidate: 219-7ubuntu1
Version table:
*** 219-7ubuntu1 0
500 http://
100 /var/lib/
Changed in systemd: | |
importance: | Unknown → Critical |
status: | Unknown → Confirmed |
Changed in systemd (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Martin Pitt (pitti) |
Changed in systemd (Ubuntu Vivid): | |
milestone: | none → vivid-updates |
summary: |
- While sbuilding, systemd loops attempting to umount the underlay + While sbuilding in LXLC, systemd loops attempting to umount the underlay |
summary: |
- While sbuilding in LXLC, systemd loops attempting to umount the underlay + While sbuilding in LXC, systemd loops attempting to umount the underlay |
Changed in systemd (Ubuntu): | |
milestone: | vivid-updates → none |
tags: | added: systemd-boot |
summary: |
- While sbuilding in LXC, systemd loops attempting to umount the underlay + LXC with r/w sys and udev keeps trying to unmount bind mounts |
description: | updated |
Log story short.
After update to systemd-219, dracut during live iso boot was not able to mount devices for further switch root, whereby booting iso in live mode was not possible. An example:
LOOPDEV=$( losetup -f ) LiveOS/ squashfs. img
losetup -r $LOOPDEV /live/media/
mount -n -t squashfs -o ro $LOOPDEV /live/distrib
After a deep digging, and getting system to boot into a real root simple mount command was not mounting anything.
mount -n -t squashfs -o ro /media/ OpenMandriva_ 2015.0/ LiveOS/ squashfs. img /media/test
Applying those patches fixed issue: /bugzilla. gnome.org/ show_bug. cgi?id= 743891
https:/