[Piuparts-commits] [piuparts] 01/03: Umount /proc/sys/fs/binfmt_misc to work around a binfmt bug

Holger Levsen holger at layer-acht.org
Thu Dec 22 11:15:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit f87f7ed7dc359197d5dc855fbdf5512671003b45
Author: Antonio Ospite <ao2 at ao2.it>
Date:   Sun Dec 11 17:16:14 2016 +0100

    Umount /proc/sys/fs/binfmt_misc to work around a binfmt bug
    
    Some java packages (e.g. "signtos") trigger update-binfmts, which mounts
    /proc/sys/fs/binfmt_misc but never unmounts it.
    
    When dealing with such scenario piuparts cannot unmount the chroot
    successfully because /proc results busy.
    
    Work around the issue by force-unmounting /proc/sys/fs/binfmt_misc
    before anything else.
    
    The same workaround was also used in other projects:
    https://bugs.launchpad.net/ubuntu/+source/binfmt-support/+bug/534211
    https://lists.debian.org/debian-live/2007/01/msg00039.html
    
    Closes: #704037
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 piuparts.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/piuparts.py b/piuparts.py
index 11e1c9b..d5c9fab 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -1577,6 +1577,12 @@ class Chroot:
 
     def unmount_all(self):
         """Unmount everything we mount()ed into the chroot."""
+
+        # Workaround to unmount /proc/sys/fs/binfmt_misc which is mounted by
+        # update-binfmts but never unmounted, see:
+        # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704037
+        run(["umount", self.relative("/proc/sys/fs/binfmt_misc")], ignore_errors=True)
+
         for mountpoint in reversed(self.mounts):
             run(["umount", mountpoint], ignore_errors=True)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list