[buildd-tools-devel] Bug#728096: Bug#728096: schroot fails if shm tmpfs is mounted on /dev/shm

Roger Leigh rleigh at codelibre.net
Tue Jul 15 21:15:08 UTC 2014


On Mon, Nov 25, 2013 at 04:49:45PM +0100, Laurent Bigonville wrote:
> Hi,
> 
> To be even more clear:
> 
> HOST:
> bigon at soldur:~$ ls -ld /dev/shm /run/shm
> ls: impossible d'accéder à /run/shm: Aucun fichier ou dossier de ce type
> drwxrwxrwt. 2 root root 300 nov 25 16:05 /dev/shm
> 
> CHROOT:
> (sid-amd64-sbuild)root at soldur:/# ls -ld /dev/shm /run/shm
> lrwxrwxrwx. 1 root root    8 Nov 23  2012 /dev/shm -> /run/shm
> drwxr-xr-x. 2 root root 4096 Nov 23  2012 /run/shm
> 
> Creating /run/shm on the host is also fixing this.

Sorry for the delayed reply; RSI has been limiting my activity for some
time.

> Is it possible that schroot is actually trying to resolve the /dev/shm
> -> /run/shm symlink outside of the chroot?

It's possible, but unlikely.  The schroot-mount helper should ensure that
all mountpoints are inside the chroot and that it's not a symlink which
could redirect to a mountpoint outside.  That condition should be fatal.

Simply removing the /dev/shm link inside the chroot and making it a
directory should make things work.

Note that the "-v" option will make schroot log all mount operations
during session creation, and umount operations during cleanup.  I'd
recommend running with this to debug what's going on.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800



More information about the Buildd-tools-devel mailing list