Running pbuilder (on bionic) in parallel when bind-mounting /dev/shm causes the host tmpfs to unmount
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pbuilder (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
If I run something like:
vagrant@
And then in parallel (from another SSH session):
vagrant@
When the second command finishes the tmpfs on /dev/shm is unmounted. Unsurprisingly this causes chaos on the host system. This happens on Bionic but not Xenial, and originally came up on our physical Jenkins agents, but I've reproduced with Vagrant here by way of illustration.
It turns out that the `/dev/shm /run/shm` bind mount is unnecessary, as the RUNSHM option defaults to yes anyway, and removing it makes the problem go away. That being said, I don't know if the same behaviour would happen in the case of other bind mounts when running in parallel, and I'm not sure this should be happening.
Ubuntu version:
vagrant@
Description: Ubuntu 18.04.1 LTS
Release: 18.04
pbuilder version:
vagrant@
pbuilder:
Installed: 0.229.1
Candidate: 0.229.1
Version table:
*** 0.229.1 500
500 http://
100 /var/lib/
The /etc/pbuilder/
```
# Distribution and Architecture settings
DISTRIBUTION=
ARCHITECTURE=
COMPONENTS="main restricted universe multiverse xenial-backports xenial-updates"
# Directories
BASETGZ=
BUILDPLACE=
BUILDRESULT=
APTCACHE=
HOOKDIR=
CCACHEDIR=
# Build Options
CPUS=`grep -c ^processor /proc/cpuinfo`
DEBBUILDOPTS=
# Environment Options
BINDMOUNTS=
EXTRAPACKAGES=
DEBEMAIL=""
PBUILDERROOTCMD
BUILDUSERID=12345
# Exports for the environment
export CCACHE_
export CCACHE_NOSTATS=1
export http_proxy=
export https_proxy=
export no_proxy=$no_proxy
#use eatmydata to avoid fsync in the chroots
export LD_PRELOAD=
```
Before running pbuilder:
vagrant@
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
vagrant@
drwxrwxrwt 2 root root 40 Jan 29 16:51 shm
After:
vagrant@
<no output>
vagrant@
drwxr-xr-x 2 root root 40 Jan 29 16:21 shm
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: pbuilder 0.229.1
ProcVersionSign
Uname: Linux 4.15.0-43-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
Date: Tue Jan 29 16:54:47 2019
PackageArchitec
SourcePackage: pbuilder
UpgradeStatus: No upgrade log present (probably fresh install)