[Pkg-sysvinit-devel] Bug#674178: /dev/shm is not set up right in chroot

Roger Leigh rleigh at codelibre.net
Wed May 23 17:37:59 UTC 2012


On Wed, May 23, 2012 at 12:02:15PM -0500, Serge Hallyn wrote:
> Quoting Roger Leigh (rleigh at codelibre.net):
> > On Wed, May 23, 2012 at 10:47:26AM -0500, Serge Hallyn wrote:
> > > Package: sysvinit
> > > Version: 2.88dsf-24
> > > 
> > > If you do:
> > > 
> > >     debootstrap sid sid
> > >     chroot sid dpkg -i /var/cache/apt/acrchives/initscripts*.deb
> > > 
> > > you will be left with a mount on sid/run/shm
> > > 
> > > The related Ubuntu bug is https://bugs.launchpad.net/launchpad/+bug/974584 .
> > > 
> > > A debdiff proposed (but not yet pushed) to fix this in Ubuntu follows.
> > 
> > Could you possibly try with -25 (in experimental).  I fixed a bug with
> 
> I'm only seeing -24 right now, will re-check in a bit.
> 
> (http://packages.debian.org/experimental/sysvinit)

Hmm, looks like the upload went wrong last night; it was not accepted
for some reason.  I've reuploaded--it's definitely passed through the
upload queue.  In the meantime, you can also get the packages here:
http://people.debian.org/~rleigh
(It's now also in incoming, http://incoming.debian.org/sysvinit_2.88dsf-25.dsc)

> > /run/shm handling last night, though it was related to size
> > determination rather than chroot handling it's not impossible that it's
> > related.
> > 
> > WRT the patch, if ischroot is behaving incorrectly, then the ischroot
> > utility needs updating.
> 
> Ok - as I said in the Ubuntu bug I do suspect we don't want that part
> in there.  I'm not sure whether 'chroot dpkg -i *.deb' without
> mounting /proc is meant to be supported.

In practice, /proc is required.  There's too much that needs it; just
look at the usage in maintainer scripts--they rely in it without
checking for its presence.

The mounting and unmounting of /proc is a good workaround, and it's
something that the ischroot tool /might/ be best doing, especially
since it's relying on it being present.  However, whether this
should be done basically depends on whether using a chroot without
/proc being mounted is supported.  I would think "no" is the answer,
to be honest.  IIRC debootstrap mounts /proc automatically, and all
the chroot usage on Debian e.g. build and user chroots either have
/proc mounted in fstab, or use schroot to set up the chroot
automatically.

> > Given that /run/shm should be handled identically to /run, and
> > /run/lock, I think it's more important to work out why it's
> > behaving differently than the other two.  I assume that the other
> > two are not being mounted?
> 
> Correct.  Only /run/shm.
> 
> I'll try -25 when I see it, thanks.

Thanks.  Given your more detailed explanation, I'm not sure that
-25 will address your immediate problem, though it's certainly
possible there is something odd happening with /run/shm we need to
correct.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800





More information about the Pkg-sysvinit-devel mailing list