Bug#709053: pbuilder: fails to upgrade chroot: "umount: /dev/shm: device is busy."

Ben Hutchings ben at decadent.org.uk
Tue Jul 16 03:59:42 UTC 2013


Control: clone -1 -2
Control: retitle -1 pbuilder over-mounts /dev/shm on host after chroot upgraded from squeeze
Control: retitle -2 pbuilder does not mount /dev/shm in squeeze chroots

On Mon, 2013-05-20 at 15:35 +0200, intrigeri at debian.org wrote:
> Package: pbuilder
> Version: 0.215
> Severity: important
> 
> a pbuilder --update results in:
> 
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> W: no hooks of type E found -- ignoring
> I: unmounting dev/pts filesystem
> I: unmounting run/shm filesystem
> W: Could not unmount run/shm: umount: /dev/shm: device is busy.
>         (In some cases useful info about processes that use
>          the device is found by lsof(8) or fuser(1))
> W: Retrying to unmount run/shm in 5s
> umount: /dev/shm: device is busy.
>         (In some cases useful info about processes that use
>          the device is found by lsof(8) or fuser(1))
> 
> ... and the last steps loop, seemingly endlessly.
> 
> pbuilder 0.213 does not expose this problem.
[...]

I'm also seeing this after a build.

pbuilder tries to mount various pseudo-filesystems under the chroot
location, before entering the chroot, including /run/shm.  But if
/run/shm in the chroot is a symlink to /dev/shm, mount will follow that
link and will over-mount /dev/shm on the host filesystem!

It looks like /run/shm is supposed to replace /dev/shm.  In squeeze,
only /dev/shm exists.  In wheezy, initscripts creates a /run/shm
directory and makes /dev/shm a symlink to it, but will do the opposite
if you have an fstab entry for /dev/shm.  (systemd only creates
/dev/shm, though.)

Now sysvinit doesn't run in a chroot environment, but initscripts does
modify /dev/shm and /run/shm on upgrade.  So I think that if you've
upgraded a squeeze chroot to wheezy you will see this problem, but a
fresh chroot will be fine.

pbuilder should fail with an obvious error message if a mountpoint in
the chroot is a symlink.  It should also continue to support the use of
/dev/shm in some way.

Ben.

-- 
Ben Hutchings
Humans are not rational beings; they are rationalising beings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pbuilder-maint/attachments/20130716/493739ca/attachment.sig>


More information about the Pbuilder-maint mailing list