missing /run/shm backwards compat symlink

Bug #1320534 reported by Dimitri John Ledkov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Invalid
Undecided
Unassigned
systemd (Debian)
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
sysvinit (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

systemd does not honor ubuntu default mountpoints as listed in /lib/init/fstab

specifically just /run/shm is missing, which breaks existing ubuntu chroots which have installed initscripts package which made /dev/shm a symlink to /run/shm.

initscripts.postinst should probably stop doing that, as that breaks ubuntu chroots on systems that don't have /run/shm.

tags: added: systemd-boot
Revision history for this message
Roger Leigh (rleigh) wrote :

There is no solution at present; these are generated at buildtime for the host OS, so don't vary at runtime. That said, it would help to know what's different between upstart and systemd here. What's failing exactly, and why?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Build-log attached showing the problem, with stock /etc/schroot/sbuild/fstab & booted using systemd.

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, I've used schroot/sbuild under systemd for weeks now. Dimitri, is this still happening for you under current utopic?

Revision history for this message
Martin Pitt (pitti) wrote :

I can't reproduce this on current utopic with systemd 208 (in -proposed, as 204 doesn't work any more). I uncommented the /dev/shm/ entry from /etc/schroot/default/fstab, verified that in "schroot -c sid" (or utopic) I have a bind-mount /dev/shm. sbuild also works:

apt-get source pmount
sbuild -d sid pmount_0.9.23-3.dsc

During that I have

tmpfs on /var/lib/schroot/mount/sid-amd64-b1b3ec65-e048-4091-b7b0-cf942893d6d3/dev/shm type tmpfs (rw,nosuid,nodev)

So this either got fixed in the meantime, or there's something different in your configuration? Could you test again on current utopic, please? Thanks!

Changed in schroot (Ubuntu):
status: New → Incomplete
summary: - sbuild fails under systemd-boot
+ sbuild fails under systemd-boot with /dev/shm tmpfs mount
Revision history for this message
Martin Pitt (pitti) wrote : Re: sbuild fails under systemd-boot with /dev/shm tmpfs mount

Settled on IRC: This needs "profile=sbuild" in the chroot.d/* configuration, then schroot will use the sbuild/fstab instead of the default/fstab. Then I get:

E: 10mount: E: Failed to resolve path “/var/lib/schroot/mount/sid-amd64-3471b9f9-d710-47ea-b735-029f4b1c1315/dev/shm”: Not a directory

But this isn't quite the fault of systemd -- if your schroot has a broken dev/shm then /dev/ or /dev/shm/ won't be a directory to mount on. If you additionally bind-mount /dev, it works fine:

/dev /dev none rw,bind 0 0
tmpfs /dev/shm tmpfs defaults 0 0

Or change your schroot to have a /dev/shm/ directory. It seems mk-sbuild by default creates them like that:

$ ls -ld /home/martin-scratch/schroot/sid-amd64/dev/shm
lrwxrwxrwx 1 root root 8 Mai 7 2013 /home/martin-scratch/schroot/sid-amd64/dev/shm -> /run/shm

Thus it can't mount something onto a symlink.

Changed in schroot (Ubuntu):
status: Incomplete → Invalid
tags: removed: systemd-boot
Revision history for this message
Martin Pitt (pitti) wrote :

This really doesn't look specific to the init system, thus dropping the systemd-boot tag.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On fresh Utopic host (VM, server install):

$ sudo apt-get update; sudo apt-get install ubuntu-dev-tools systemd haveged
$ mk-sbuild utopic
relogin
$ mk-sbuild utopic
$ sbuild-update --keygen
$ pull-lp-source hello
$ sbuild -Ad utopic *.dsc

# boot with init=/lib/systmed/systemd

$ sbuild -Ad utopic *.dsc

Fails with
"E: 10mount: E: Failed to resolve path "...../dev/shm": Not a directory"

/run/shm does not exsit.

This is a bug in systmed, until we support booting with either upstart or systemd "/run/shm" should continue to be present.

Specifically, systemd, unlike mountall does not appear to support and match Ubuntu default mount points as specified in /lib/init/fstab.

summary: - sbuild fails under systemd-boot with /dev/shm tmpfs mount
+ systemd does not honor Ubuntu default mountpoints (as listed in
+ /lib/init/fstab by upstart/mountall)
affects: schroot (Ubuntu) → systemd (Ubuntu)
Changed in systemd (Ubuntu):
status: Invalid → Confirmed
Changed in mountall (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: systemd does not honor Ubuntu default mountpoints (as listed in /lib/init/fstab by upstart/mountall)

http://paste.ubuntu.com/7905336/

Diff between upstart+cgmanager mountpoints vs systemd from utopic-proposed (208)

summary: systemd does not honor Ubuntu default mountpoints (as listed in
- /lib/init/fstab by upstart/mountall)
+ /lib/init/fstab by upstart/mountall) ... well just /run/shm is missing
description: updated
Changed in mountall (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: systemd does not honor Ubuntu default mountpoints (as listed in /lib/init/fstab by upstart/mountall) ... well just /run/shm is missing

(1) ubuntu-dev-tools should stop using /run/shm, and instead use /dev/shm.
(2) i think we need compat /run/shm one way or the other as a legacy support.

Changed in ubuntu-dev-tools (Ubuntu):
status: New → Confirmed
assignee: nobody → Dimitri John Ledkov (xnox)
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in systemd (Ubuntu):
status: Confirmed → Fix Committed
summary: - systemd does not honor Ubuntu default mountpoints (as listed in
- /lib/init/fstab by upstart/mountall) ... well just /run/shm is missing
+ missing /run/shm backwards compat symlink
affects: ubuntu-dev-tools (Ubuntu) → sysvinit (Ubuntu)
description: updated
Changed in sysvinit (Ubuntu):
assignee: Dimitri John Ledkov (xnox) → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in the proposed 2.88dsf-53.2ubuntu1 merge.

Changed in sysvinit (Ubuntu):
status: Confirmed → Fix Committed
Changed in systemd (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 208-7ubuntu4

---------------
systemd (208-7ubuntu4) utopic; urgency=medium

  * Lower Breaks: to lvm2 again. Our lvm2 package has always used udev for
    device setup, and thus should be compatible with systemd, too.
 -- Martin Pitt <email address hidden> Thu, 07 Aug 2014 07:11:28 +0200

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (16.2 KiB)

This bug was fixed in the package sysvinit - 2.88dsf-53.2ubuntu1

---------------
sysvinit (2.88dsf-53.2ubuntu1) vivid; urgency=medium

  * Drop debian/initscripts.maintscript and other conffile cleanups which were
    only necessary for P → T upgrades.
  * Drop our change to keep /etc/mtab a a file instead of a symlink to
    /proc/mounts. /run/mount/utab has worked well for a long time now.
  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Remove some initscripts (bootlogs, motd, rmnologin) and
      /etc/network/if-up.d/mountnfs as they have been replaced by upstart jobs
      shipped in other packages.
    - init.d/umountroot: If /var/run/init.upgraded exists, call telinit u
      before unmounting the root filesystem.
    - debian/patches/91_sulogin_lockedpw.dpatch: Disable "root account is
      locked" warning, since this is the default in Ubuntu. Document this in
      sulogin.8.
    - debian/patches/92_sulogin_support_static_sh.patch: add support for
      /bin/static-sh as fallback if the regular shell fails to execute
    - debian/control: Drop Essential: yes from sysvinit-utils since we use
      Upstart.
    - debian/control: Do not build the sysvinit and sysvinit-core binary
      packages. We don't want to support sysvinit as such, nor a dynamic
      selection between multiple init systems.
    - Mark all binary packages as Multi-Arch: foreign to allow for upstart
      to be installable with multi-arch (needed for armhf containers on x86)
    - Drop /etc/default/tmpfs, and drop mention of it from
      debian/src/initscripts/man/rcS.5.
    - Include /lib/lsb/init-functions in various init.d scripts, or move it
      further to the top, so that they get skipped as there are equivalent
      upstart jobs.
    - Drop /lib/init/{tmpfs.sh,mount-functions.sh} and their usage in init.d
      scripts; we do not need those scripts due to the previous change.
    - Add debian/src/initscripts/etc/init.d/ondemand: Sleep for 60 seconds,
      then set CPU Frequency Scaling governor to "ondemand" (or to
      "interactive" on systems that support it).
    - Remove mention of RAMLOCK, RAMSHM, and RAMTMP from the rcS(5) manual
      page.
    - Fix documentation for other things handled by mountall instead of
      initscripts: tmpfs, /sys (mountall lets you specify options in
      /etc/fstab), and ASYNCMOUNTNFS.
    - debian/src/initscripts/etc/init.d/sendsigs:
      + sendsigs: OMITPIDS needs to be reinitalized for every loop iteration
        before concatenating pids of upstart jobs to it.
      + only omit jobs that are in the 'start' goal or that are in state
        'stop/killed'. Those that are destined for 'stop' are waited on and
        killed like all other processes.
      + make report_unkillable use apport instead of echoing to console; but
        disable this reporting by default.
      + wait up to 300 extra seconds for upstart jobs that have been killed.
    - debian/src/sysv-rc/sbin/invoke-rc.d: clean eatmydata from environment
      unless INVOKE_RCD_ALLOW_EATMYDATA is set to value other than '0'.
      (LP #1257036)
    - debian/src/sysv-rc/sbin/invoke-rc.d: Call 'initctl reload-configuration'
      to wo...

Changed in sysvinit (Ubuntu):
status: Fix Committed → Fix Released
Changed in systemd (Debian):
status: New → Fix Committed
Changed in systemd (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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