I looked at this some more today and I've figured out the cause. Before
schroot performs the mounts inside of the container, based on the
profile's fstab, it attempts to resolve all symlinks in the target path.
Here's the problematic line in the sbuild fstab:

  tmpfs           /dev/shm        tmpfs   defaults        0       0

It takes "/dev/shm/" and appends it to the chroot's source or session
path, which results in something like "/var/lib/schroot/chroots/utopic-
amd64/dev/shm". It then uses realpath(3) to resolve all of the symlinks
so that if "/dev/shm" inside of the container pointed at "/run/shm", it
would do the mount at "/var/lib/schroot/chroots/utopic-amd64/run/shm".

However, the combination of a Vivid or newer host and a Utopic or older
chroot causes problems. Here are the symlinks involved:

/var/lib/schroot/chroots/utopic-amd64/dev/shm -> /run/shm
/run/shm -> /dev/shm

So realpath(3) is going to return "/dev/shm/", which results in tmpfs
being mounted at the *host's* /dev/shm path.

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

Title:
  Host's /dev/shm is mounted over when entering 14.10 and older sbuild
  schroots

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sbuild/+bug/1438942/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to