Bug#391319: [Buildd-tools-devel] Bug#391319: schroot: leftover processes cause umount to fail

Roger Leigh rleigh at whinlatter.ukfsn.org
Sat Oct 7 09:54:10 UTC 2006


"Kees Cook" <kees at outflux.net> writes:

> While using schroot on LVM snapshots with sbuild, I have sometimes run into
> situations where build deps start up services (like cron, dbus, etc).
> Once the build is finished, schroot attempts to umount and destroy the
> LVM snapshot, but since there are still processes running in the chroot,
> the umount fails.
>
> Since the chroot is "over", it seems like it makes sense to kill all the
> processes left in the chroot, and then reattempt to umount.  This patch
> implements that.  Does this seem like a sensible change?

Yes, it's a good idea.

One concern I have is what will happen to bind mounted filesystems, or
filesystems mounted multiple times?  If there are open files, we don't
want to kill anything /outside/ the chroot, which may also be using
the filesystem.

As an example, if I have a /srv mounted inside and outside the chroot,
and a daemon outside is using it, and a daemon inside is using it, the
umount will fail, but only the inside daemon should be killed.

Another example is a bind mounted /home.  If this fails to umount, we
might blow away all the user's processes on the entire system.

If this can be done safely, I'll be happy to apply the patch.


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20061007/2335dd3b/attachment.pgp


More information about the Buildd-tools-devel mailing list