On Thu, Apr 14, 2011 at 09:15:45PM +0200, Tollef Fog Heen wrote:
> ]] Roger Leigh 
> 
> | On Thu, Apr 14, 2011 at 02:44:44PM +0200, Julian Andres Klode wrote:
> | > Package: systemd, schroot
> | > Severity: critical
> | > 
> | > sjak@jak-thinkpad:~$ schroot 
> | > (sid)jak@jak-thinkpad:~$ logout
> | > Sessions still open, not unmounting
> | > E: 10mount: umount: 
> /var/lib/schroot/mount/sid-a30628db-3095-4db0-aad9-0ae33f96ca30/dev/mqueue: 
> Too many levels of symbolic links
> | > E: sid-a30628db-3095-4db0-aad9-0ae33f96ca30: Chroot setup failed: 
> stage=setup-stop
> | 
> | Could I possibly have the output of the above with the addition of
> |   --verbose --debug=notice
> | to the schroot command-line?
> 
> E: 10mount: umount: 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/hugepages:
>  Too many levels of symbolic links
> D(2): run_parts: 10mount failed with status 1
> E: squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe: Chroot setup failed: 
> stage=setup-stop
> : tfheen@qurzaw ~ > 
> 
> | Also the output of
> |   /usr/lib/schroot/schroot-listmounts -m /var/lib/schroot/mount/$session
> | on the host, and an ls -l of each of the mountpoints.
> 
> : tfheen@qurzaw ~ > sudo /usr/lib/schroot/schroot-listmounts -m 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe      
>         
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/hugepages
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/mqueue
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/mqueue
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/shm
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/pts
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/fuse/connections
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/kernel/security
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/kernel/security
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/kernel/debug
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/kernel/debug
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/blkio
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/net_cls
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/freezer
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/devices
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/cpuacct
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/cpu
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/ns
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/cpuset
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup/systemd
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys/fs/cgroup
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/sys
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/proc/sys/fs/binfmt_misc
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/proc/sys/fs/binfmt_misc
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/proc
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe
> 
> : tfheen@qurzaw ~ > sudo /usr/lib/schroot/schroot-listmounts -m 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe | 
> LANG=C xargs ls -ld
> ls: 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/hugepages:
>  Too many levels of symbolic links
> 
> | What is systemd doing here that we're breaking on?  Is /dev/mqueue
> | a symlink or separate mount?  Why is the umount failing so badly?
> 
> It's an autofs mount:
> 
> : tfheen@qurzaw ~ > mount | grep mqueue
> systemd-1 on /dev/mqueue type autofs 
> (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
> mqueue on /dev/mqueue type mqueue (rw,relatime)
> systemd-1 on 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/mqueue
>  type autofs 
> (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
> mqueue on 
> /var/lib/schroot/mount/squeeze-i386-fb18d103-2f36-42a7-b430-6014096537fe/dev/mqueue
>  type mqueue (rw,relatime)

OK, I think the solution here is simply for schroot to cease using
"rbind" and use plain "bind".  This will ensure we only bind things
which are safe (or safer) than binding everything.

We currently use rbind for /dev, /sys and /proc.  Could you possibly
let me know what's mounted under each on the /host/, minus the
autofs mounts?  A complete list of the autofs mountpoints would also
be useful.

The rbind was flexible because it would adapt to whatever what mounted
under a given path, whereas a static list does not.  We might want to
consider repurposing the dump/pass numbers here to indicate if the
mountpoints must/may be present on the host and in the chroot so that
we can conditionally do the mount if the mountpoints are present, and
if it's strictly required, error out if they are absent.  But this
would still only have a certain level of flexibility--every possible
submount would require listing explicitly.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature

Reply via email to