/proc does not get umounted after debootstrap

Bug #805886 reported by Jean-Louis Dupond
This bug affects 10 people
Affects Status Importance Assigned to Milestone
debootstrap (Debian)
Fix Released
util-linux (Debian)
Fix Released
util-linux (Ubuntu)
Fix Released
Fix Released

Bug Description

It seems that debootstrap does NOT umount /proc in the chroot after its run.

This causes for example pbuilder to fail, as it tries to remount /proc

Related branches

Revision history for this message
Colin Watson (cjwatson) wrote :

I can't reproduce this. Can you provide a debootstrap command (not in the context of pbuilder) that demonstrates this?

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :
Download full text (36.2 KiB)

jean-louis@laptop-jl:~$ mkdir test
jean-louis@laptop-jl:~$ cd test
jean-louis@laptop-jl:~/test$ sudo debootstrap --include=apt --variant=buildd --keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg oneiric . http://archive.ubuntu.com/ubuntu/
[sudo] password for jean-louis:
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://archive.ubuntu.com/ubuntu...
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
I: Retrieving base-files
I: Validating base-files
I: Retrieving base-passwd
I: Validating base-passwd
I: Retrieving bash
I: Validating bash
I: Retrieving binutils
I: Validating binutils
I: Retrieving bsdutils
I: Validating bsdutils
I: Retrieving build-essential
I: Validating build-essential
I: Retrieving busybox-initramfs
I: Validating busybox-initramfs
I: Retrieving bzip2
I: Validating bzip2
I: Retrieving coreutils
I: Validating coreutils
I: Retrieving cpio
I: Validating cpio
I: Retrieving cpp
I: Validating cpp
I: Retrieving cpp-4.6
I: Validating cpp-4.6
I: Retrieving dash
I: Validating dash
I: Retrieving debconf
I: Validating debconf
I: Retrieving debianutils
I: Validating debianutils
I: Retrieving diffutils
I: Validating diffutils
I: Retrieving dpkg
I: Validating dpkg
I: Retrieving dpkg-dev
I: Validating dpkg-dev
I: Retrieving e2fslibs
I: Validating e2fslibs
I: Retrieving e2fsprogs
I: Validating e2fsprogs
I: Retrieving fakeroot
I: Validating fakeroot
I: Retrieving findutils
I: Validating findutils
I: Retrieving g++
I: Validating g++
I: Retrieving g++-4.6
I: Validating g++-4.6
I: Retrieving gcc
I: Validating gcc
I: Retrieving gcc-4.6
I: Validating gcc-4.6
I: Retrieving gcc-4.6-base
I: Validating gcc-4.6-base
I: Retrieving gnupg
I: Validating gnupg
I: Retrieving gpgv
I: Validating gpgv
I: Retrieving grep
I: Validating grep
I: Retrieving gzip
I: Validating gzip
I: Retrieving hostname
I: Validating hostname
I: Retrieving ifupdown
I: Validating ifupdown
I: Retrieving initramfs-tools
I: Validating initramfs-tools
I: Retrieving initramfs-tools-bin
I: Validating initramfs-tools-bin
I: Retrieving initscripts
I: Validating initscripts
I: Retrieving insserv
I: Validating insserv
I: Retrieving klibc-utils
I: Validating klibc-utils
I: Retrieving libacl1
I: Validating libacl1
I: Retrieving libalgorithm-diff-perl
I: Validating libalgorithm-diff-perl
I: Retrieving libalgorithm-diff-xs-perl
I: Validating libalgorithm-diff-xs-perl
I: Retrieving libalgorithm-merge-perl
I: Validating libalgorithm-merge-perl
I: Retrieving libattr1
I: Validating libattr1
I: Retrieving libblkid1
I: Validating libblkid1
I: Retrieving libbz2-1.0
I: Validating libbz2-1.0
I: Retrieving libc-bin
I: Validating libc-bin
I: Retrieving libc-dev-bin
I: Validating libc-dev-bin
I: Retrieving libc6
I: Validating libc6
I: Retrieving libc6-dev
I: Validating libc6-dev
I: Retrieving libclass-isa-perl
I: Validating libclass-isa-perl
I: Retrieving libcloog-ppl0
I: Validating libcloog-ppl0

Revision history for this message
Colin Watson (cjwatson) wrote :

readlink("/media/mybook/chroot/805886/proc", 0xbfb669cb, 4096) = -1 EINVAL (Invalid argument)
stat64("/sbin/umount.proc", 0xbfb67878) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
oldumount("/proc") = -1 EBUSY (Device or resource busy)

The phrase "eh?" comes to mind.

Revision history for this message
Andreas Moog (ampelbein) wrote :

Downgrading 'mount' to 2.17.2-9.1ubuntu4 fixes the issue, so reassigning to util-linux.

affects: debootstrap (Ubuntu) → util-linux (Ubuntu)
Revision history for this message
Loïc Minier (lool) wrote :

Could this be related to the high profile yet extremely uncommon pre-linux 3.0 bug around dentry cache being corrupted?


Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Raised to "High" as the pbuilder is an important tool for Ubuntu packagers.

Changed in util-linux (Ubuntu):
importance: Undecided → High
Changed in util-linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Francesco Del Degan (pr0gg3d) wrote :

I think that this is related to this behaviour on debootstrap exit, when it tries to umount the chrooted /proc:

root@oneiric:/var/cache/pbuilder/build/26972# umount /var/cache/pbuilder/build//26972/./proc
umount: /proc: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

but the very odd behaviour is that if i try to do (changing working dir):

root@oneiric:/var/cache/pbuilder/build/26972# cd ..
root@oneiric:/var/cache/pbuilder/build# umount /var/cache/pbuilder/build//26972/./proc

Using mount 2.17.2-9.1ubuntu4 there are no issues.

The mounting is done via chroot, so the entry in /etc/mtab isn't present.

I think that it's more related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634107

Timo Aaltonen (tjaalton)
Changed in util-linux (Ubuntu Oneiric):
milestone: none → ubuntu-11.10-beta-1
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

this is fixed now

util-linux (2.19.1-2ubuntu3) oneiric; urgency=low

  * Use canonicalize_spec in getmntdevbackward. proc should not be
    interpreted as a non-canonical-path. Thanks Francesco Del Degan!

Changed in util-linux (Ubuntu Oneiric):
status: Confirmed → Fix Released
Changed in debootstrap (Debian):
status: Unknown → New
Changed in util-linux (Debian):
status: Unknown → New
Changed in debootstrap (Debian):
status: New → Fix Released
Changed in util-linux (Debian):
status: New → Fix Committed
Changed in util-linux (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.