[buildd-tools-devel] Bug#726375: [Pkg-systemd-maintainers] Bug#726375: schroot: Fails during umount on system booted with systemd

Antonio Terceiro terceiro at debian.org
Sat Feb 22 19:30:42 UTC 2014


On Tue, Nov 12, 2013 at 08:37:36PM +0100, Michael Stapelberg wrote:
> I think I found the issue: when running systemd, / is marked as a shared
> mountpoint by default, which recursively applies to everything
> underneath /. See mount(8) for details on shared mountpoints.
> 
> The attached patch fixes it for me. Quote from the patch itself:
> 
> +    # Mark this mountpoint as private, some systems have / as a shared mountpoint.
> +    # As an example, assume /home/m/ch is the chroot directory.
> +    # schroot will mount -o bind /home/m/ch to /var/lib/schroot/mount/ch-123
> +    # Afterwards, it will bind-mount /dev to /var/lib/schroot/mount/ch-123.
> +    # With shared mountpoints, that mount will also show up in the original
> +    # /home/m/ch. This is a problem once schroot mounted /home: the following
> +    # mount of /tmp will show up in /var/lib/schroot/mount/ch-123/tmp,
> +    # /home/m/ch/tmp and /home/m/ch/home/m/ch/tmp (!), which leads to failure
> +    # on unmounting.
> +    mount --make-private "$3"
> 
> I haven’t done thorough testing and I’m not familiar with the schroot
> codebase, so there may be side-effects of that patch. I can only
> reiterate: it works for me in my tests :).
> 
> Please consider merging it. Thanks.

I confirm this fixes the problem for me. It would be nice if the next
schroot upload included it.

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20140222/b8c3e6ed/attachment.sig>


More information about the Buildd-tools-devel mailing list