[Pkg-zsh-devel] faketime: does not work in Jessie/Sid chroots running on Wheezy installations/kernel ("sem_open: Function not implemented")

Axel Beckert abe at debian.org
Sun Mar 8 15:38:33 UTC 2015


Control: severity -1 minor
Control: retitle -1 faketime: does not work in chroot if /run/shm is not mounted as tmpfs inside the chroot ("sem_open: Function not implemented")

Hi Ivo and Daniel,

Axel Beckert wrote:
> Ivo De Decker wrote:
> > On Sun, Feb 15, 2015 at 01:02:40PM +0100, Axel Beckert wrote:
> > > [pbuilder] # faketime 'last friday 5 pm' /bin/date
> > > sem_open: Function not implemented
> > 
> > > If there's anything I can do to avoid this issue in the way the zsh
> > > package uses faketime -- I'm happy about any hint.
> > 
> > This is usually caused by /dev/shm not being world writable in your build
> > chroot.
> 
> Thanks for that hint. Unfortunately it didn't help for me:
[...]

The relevant difference weren't the permissions but the fact if
/run/shm was bind mounted into the chroot or not:

pbuilder # ls -la /run/shm/
total 8
drwxr-xr-x 2 root root 4096 Jul 12  2012 .
drwxr-xr-x 5 root root 4096 Jul 12  2012 ..
pbuilder # faketime 'last friday 5 pm' /bin/date
sem_open: Function not implemented
pbuilder # 

Now doing "mount -o bind /run/shm
/var/cache/pbuilder/build/4430/run/shm" outside the pbuilder chroot.
Doing "mount -t tmpfs none /run/shm" inside the chroot seems to work
as well.

pbuilder # ls -la /run/shm/
total 4
drwxrwxrwt 2 root root   60 Mar  8 15:10 .
drwxr-xr-x 5 root root 4096 Jul 12  2012 ..
-rw-r--r-- 1 root root    0 Jan 28 10:15 .tmpfs
pbuilder # faketime 'last friday 5 pm' /bin/date
Fri Mar  6 17:00:00 UTC 2015
pbuilder # 

So this looks more like being caused by pbuilder in Wheezy not
mounting /run/shm. This is probably https://bugs.debian.org/700591
which is fixed in Jessie, but not in Wheezy.

I can even reproduce this issue in Jessie by manually doing an "umount
/var/cache/pbuilder/build/18025/run/shm" before exiting pbuilder and
then calling faketime.

Daniel: If faketime in Jessie requires /run/shm to be a tmpfs
whatever, feel free to close this bug report and tag it with wontfix.
There should be enough explanations in here now so that anyone getting
as far as having found this bug report will also know how to fix his
chroot.

Mika: Can we have /run/shm mounted in the chroots of our Jenkins? :-)

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Pkg-zsh-devel mailing list