Debian Bug report logs -
#851427
sysvinit makes /dev/shm a symlink to /run/shm, should be other way round
Reported by: Simon McVittie <smcv@debian.org>
Date: Sat, 14 Jan 2017 21:18:02 UTC
Severity: normal
Found in version sysvinit/2.88dsf-59.8
Fixed in version sysvinit/2.93-4
Done: Dmitry Bogatov <KAction@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, debian-devel@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sat, 14 Jan 2017 21:18:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Simon McVittie <smcv@debian.org>:
New Bug report received and forwarded. Copy sent to debian-devel@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sat, 14 Jan 2017 21:18:05 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: initscripts
Version: 2.88dsf-59.8
Severity: normal
On Sat, 14 Jan 2017 at 11:00:51 -0800, Steve Langasek wrote:
> On Fri, Jan 13, 2017 at 03:54:30PM +0000, Simon McVittie wrote:
> > If I'm reading the initscripts code correctly, sysvinit does the reverse
> > by default, for some reason (/run/shm is the mount point and /dev/shm the
> > symlink). I think the motivation might have been to be able to use the
> > same tmpfs for /run and /run/shm,
>
> I recall this being a misguided attempt to move it out of /dev "because it's
> not a device". The migration did not go well, especially in the face of
> chroots that need to have it mounted, and since systemd did not handle this
> the same way sysvinit had, we effectively now have a mess in the other
> direction.
>
> We should fix it so that everything again treats /dev/shm as the mountpoint.
Let's have a bug number for that, then. Please escalate its severity if you
think that's correct.
Steps to reproduce:
* install Debian (I used vmdebootstrap according to autopkgtest-virt-qemu(1))
* apt install sysvinit-core
* reboot
* mount
* ls -al /dev/shm /root/shm
Expected result:
* /dev/shm is a tmpfs
* /run/shm is a symlink with target /dev/shm
Actual result:
* /dev/shm is a symlink with target /run/shm
* /run/shm is a tmpfs
----
This might also be related to #697003, #818442.
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sat, 14 Jan 2017 21:54:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Holger Levsen <holger@layer-acht.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sat, 14 Jan 2017 21:54:06 GMT) (full text, mbox, link).
Message #10 received at 851427@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi Simon,
thanks for this bug report, much appreciated!
On Sat, Jan 14, 2017 at 09:15:42PM +0000, Simon McVittie wrote:
> Expected result:
>
> * /dev/shm is a tmpfs
and /dev/shm is owned by root:root and has perms 1755?
--
cheers,
Holger
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sat, 14 Jan 2017 22:06:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Holger Levsen <holger@layer-acht.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sat, 14 Jan 2017 22:06:03 GMT) (full text, mbox, link).
Message #15 received at 851427@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
On Sat, Jan 14, 2017 at 09:50:43PM +0000, Holger Levsen wrote:
> and /dev/shm is owned by root:root and has perms 1755?
actually I have both 1777 and 0755 here, which of the two is correct or
are both fine??
--
cheers,
Holger
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sat, 14 Jan 2017 22:27:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Henrique de Moraes Holschuh <hmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sat, 14 Jan 2017 22:27:03 GMT) (full text, mbox, link).
Message #20 received at 851427@bugs.debian.org (full text, mbox, reply):
On Sat, 14 Jan 2017, Holger Levsen wrote:
> On Sat, Jan 14, 2017 at 09:50:43PM +0000, Holger Levsen wrote:
> > and /dev/shm is owned by root:root and has perms 1755?
>
> actually I have both 1777 and 0755 here, which of the two is correct or
> are both fine??
It has to be mode 01777, read+write. Otherwise, it breaks glibc's shm_*
and SuS/POSIX compliance, and you get to keep the pieces of everthing
that will fail in both subtle, and very non-subtle ways.
Such as Google Chrome / chromium.
--
Henrique Holschuh
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sat, 14 Jan 2017 23:15:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Simon McVittie <smcv@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sat, 14 Jan 2017 23:15:06 GMT) (full text, mbox, link).
Message #25 received at 851427@bugs.debian.org (full text, mbox, reply):
On Sat, 14 Jan 2017 at 21:50:43 +0000, Holger Levsen wrote:
> On Sat, Jan 14, 2017 at 09:15:42PM +0000, Simon McVittie wrote:
> > Expected result:
> >
> > * /dev/shm is a tmpfs
>
> and /dev/shm is owned by root:root and has perms 1755?
No, it should have the ownership and permissions that are the default
for tmpfs filesystems (root:root 01777), the same as a correctly
configured /tmp or /var/tmp.
$ ls -ld /dev/shm
drwxrwxrwt 2 root root 220 Jan 14 20:44 /dev/shm
Regards,
S
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>:
Bug#851427; Package initscripts.
(Sun, 15 Jan 2017 12:18:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Holger Levsen <holger@layer-acht.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <pkg-sysvinit-devel@lists.alioth.debian.org>.
(Sun, 15 Jan 2017 12:18:02 GMT) (full text, mbox, link).
Message #30 received at 851427@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Simon, Henrique,
thank you both for clarifying and explaining why!
On Sat, Jan 14, 2017 at 11:13:30PM +0000, Simon McVittie wrote:
> No, it should have the ownership and permissions that are the default
> for tmpfs filesystems (root:root 01777)…
--
cheers,
Holger
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>:
Bug#851427; Package initscripts.
(Thu, 10 Jan 2019 15:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Dolphin Oracle <dolphinoracle@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>.
(Thu, 10 Jan 2019 15:57:03 GMT) (full text, mbox, link).
Message #35 received at 851427@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
the buster version of sysvinit initscripts still mounts the with /run/shm
as the mount point for the tmpfs and /dev/shm as a symlink.
just adding on to the discussion...the situation actually prevents running
certain flatpak applications.
modifying mount-functions.sh per the attached will reverse the situation,
although there is still some migration code in there that strictly speaking
isn't necessary.
[Message part 2 (text/html, inline)]
[mount-functions.sh-testing-antix-rev1.tar.gz (application/x-gzip, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>:
Bug#851427; Package initscripts.
(Sat, 12 Jan 2019 12:45:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Dmitry Bogatov <KAction@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>.
(Sat, 12 Jan 2019 12:45:07 GMT) (full text, mbox, link).
Message #40 received at 851427@bugs.debian.org (full text, mbox, reply):
[ Please, next time attach patch, not whole file. Much more convenient
for review ]
[2019-01-10 10:54] Dolphin Oracle <dolphinoracle@gmail.com>
> the buster version of sysvinit initscripts still mounts the with /run/shm
> as the mount point for the tmpfs and /dev/shm as a symlink.
>
> just adding on to the discussion...the situation actually prevents running
> certain flatpak applications.
>
> modifying mount-functions.sh per the attached will reverse the situation,
Works fine to me, I intend to accept it. Dear co-maintainers,
any objections?
> although there is still some migration code in there that strictly speaking
> isn't necessary.
Further patches are welcome. Just remember, that not only fresh installs
must work fine, but also upgrade from stable must be smooth and painless.
Here is patch for convenience of other developers:
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh b/debian/src/initscripts/lib/init/mount-functions.sh
index 7511761c..98f53a86 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -436,7 +436,7 @@ post_mountall ()
# directory. The migration logic will then take care of the
# rest. Note that it will take a second boot to fully
# migrate; it should only ever be needed on broken systems.
- RAMSHM_ON_DEV_SHM="no"
+ RAMSHM_ON_DEV_SHM="yes"
if read_fstab_entry "/dev/shm"; then
RAMSHM_ON_DEV_SHM="yes"
fi
@@ -559,8 +559,8 @@ mount_shm ()
{
MNTMODE="$1"
- RAMSHM_ON_DEV_SHM="no"
- SHMDIR="/run/shm"
+ RAMSHM_ON_DEV_SHM="yes"
+ SHMDIR="/dev/shm"
if read_fstab_entry "/dev/shm"; then
if [ "$MNTMODE" = "mount_noupdate" ]; then
log_warning_msg "Warning: fstab entry for /dev/shm; should probably be for /run/shm unless working around a bug in the Oracle database"
@@ -706,13 +706,3 @@ is_fastboot_active() {
done
return 1
}
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>:
Bug#851427; Package initscripts.
(Sat, 12 Jan 2019 13:06:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Dolphin Oracle <dolphinoracle@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>.
(Sat, 12 Jan 2019 13:06:06 GMT) (full text, mbox, link).
Message #45 received at 851427@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Thank you. I will make sure to use a patch in the future.
On Jan 12, 2019 7:41 AM, "Dmitry Bogatov" <KAction@debian.org> wrote:
[ Please, next time attach patch, not whole file. Much more convenient
for review ]
[2019-01-10 10:54] Dolphin Oracle <dolphinoracle@gmail.com>
> the buster version of sysvinit initscripts still mounts the with /run/shm
> as the mount point for the tmpfs and /dev/shm as a symlink.
>
> just adding on to the discussion...the situation actually prevents running
> certain flatpak applications.
>
> modifying mount-functions.sh per the attached will reverse the situation,
Works fine to me, I intend to accept it. Dear co-maintainers,
any objections?
> although there is still some migration code in there that strictly
speaking
> isn't necessary.
Further patches are welcome. Just remember, that not only fresh installs
must work fine, but also upgrade from stable must be smooth and painless.
Here is patch for convenience of other developers:
diff --git a/debian/src/initscripts/lib/init/mount-functions.sh
b/debian/src/initscripts/lib/init/mount-functions.sh
index 7511761c..98f53a86 100644
--- a/debian/src/initscripts/lib/init/mount-functions.sh
+++ b/debian/src/initscripts/lib/init/mount-functions.sh
@@ -436,7 +436,7 @@ post_mountall ()
# directory. The migration logic will then take care of the
# rest. Note that it will take a second boot to fully
# migrate; it should only ever be needed on broken systems.
- RAMSHM_ON_DEV_SHM="no"
+ RAMSHM_ON_DEV_SHM="yes"
if read_fstab_entry "/dev/shm"; then
RAMSHM_ON_DEV_SHM="yes"
fi
@@ -559,8 +559,8 @@ mount_shm ()
{
MNTMODE="$1"
- RAMSHM_ON_DEV_SHM="no"
- SHMDIR="/run/shm"
+ RAMSHM_ON_DEV_SHM="yes"
+ SHMDIR="/dev/shm"
if read_fstab_entry "/dev/shm"; then
if [ "$MNTMODE" = "mount_noupdate" ]; then
log_warning_msg "Warning: fstab entry for /dev/shm;
should probably be for /run/shm unless working around a bug in the Oracle
database"
@@ -706,13 +706,3 @@ is_fastboot_active() {
done
return 1
}
[Message part 2 (text/html, inline)]
Reply sent
to Dmitry Bogatov <KAction@debian.org>:
You have taken responsibility.
(Sat, 19 Jan 2019 21:51:07 GMT) (full text, mbox, link).
Notification sent
to Simon McVittie <smcv@debian.org>:
Bug acknowledged by developer.
(Sat, 19 Jan 2019 21:51:07 GMT) (full text, mbox, link).
Message #50 received at 851427-close@bugs.debian.org (full text, mbox, reply):
Source: sysvinit
Source-Version: 2.93-4
We believe that the bug you reported is fixed in the latest version of
sysvinit, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 851427@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Dmitry Bogatov <KAction@debian.org> (supplier of updated sysvinit package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 19 Jan 2019 21:32:52 +0000
Source: sysvinit
Binary: sysvinit-core sysvinit-utils sysv-rc initscripts bootlogd
Architecture: source
Version: 2.93-4
Distribution: unstable
Urgency: medium
Maintainer: Debian sysvinit maintainers <debian-init-diversity@chiark.greenend.org.uk>
Changed-By: Dmitry Bogatov <KAction@debian.org>
Description:
bootlogd - daemon to log boot messages
initscripts - scripts for initializing and shutting down the system
sysv-rc - System-V-like runlevel change mechanism
sysvinit-core - System-V-like init utilities
sysvinit-utils - System-V-like utilities
Closes: 851427 918966
Changes:
sysvinit (2.93-4) unstable; urgency=medium
.
* Drop unneeded `40_multiarch_libcrypt.patch': upstream Makefile
correctly supplies -lcrypt flag by itself.
* Make debian/upstream/signing-key.asc minimal
* Check for presence of backlight-related virtual files in `brightness'
initscript (Closes: #918966)
* Make /run/shm symlink to /dev/shm, not other way around (Closes: #851427)
+ Thanks: Dolphin Oracle <dolphinoracle@gmail.com>
* Replace `debian/deps-mount' script with more straightforward dependency
on `mount [linux-any]'.
* Move {rc, rcS} scripts from /usr/libexec to /lib for convenience of
non-users of initramfs.
* Drop per-binary-package copyright files, superseded by dep5
`debian/copyright'.
Checksums-Sha1:
88d314d8726dc17c739526f5c70cca9bfa5ecff0 2657 sysvinit_2.93-4.dsc
8c8476822f617be2f48d2308c702eec4a569332f 127088 sysvinit_2.93-4.debian.tar.xz
a98ab0e58e2ff36b2d648be52e501c2c73b86d49 5680 sysvinit_2.93-4_source.buildinfo
Checksums-Sha256:
2d0d434b8468f1ba17e7c1f45585357d303650bd5b41343dbcffb25a267a04bb 2657 sysvinit_2.93-4.dsc
39eeb895132e89364cfd02309aa61bcf708c781ad48ed8cd3ef551b9dbdeb50d 127088 sysvinit_2.93-4.debian.tar.xz
badeb0df140dcedbef0d7f7483a61658147dc3d56bcd037cfa08287d78de1100 5680 sysvinit_2.93-4_source.buildinfo
Files:
4f8a3386ed5d12f09b1d104de8802fdb 2657 admin optional sysvinit_2.93-4.dsc
01285337a60192d801e6b66a163f19f9 127088 admin optional sysvinit_2.93-4.debian.tar.xz
d7bf9cb3c228e497ffe20d622112969c 5680 admin optional sysvinit_2.93-4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJHBAEBCgAxFiEEhnHVzDbtdH7ktKj4SBLY3qgmEeYFAlxDl6sTHGthY3Rpb25A
ZGViaWFuLm9yZwAKCRBIEtjeqCYR5qKsEACkXLj7TLOz+rhJw92SgB4NIgjA+7s9
5xAkrC8sl40TI8eyXeSDuc9P4MT6mLNni7OVw8qB3afL6Jbl2tRdlaiTk7rd/1TV
0qzyOa0Bic22WZwSt8GSdAhfJmUhzmxgzOMD+Ud6R9FO6g7rW1jBRo20J+pfuJsu
cbdWDgWwIVXs2OWW9GZu0KxOK9787W4vd3ZLioRXrm8BDTFkbcxToKhuSKDtdEVk
oz8pjO/2lwbc8xYbu38K808n7v+t4WekOo4JKETSsW1hCMm1kNXSGXNT/IGT4xt9
bgf82nCMe4Pa8U4Ct4pPmpIFfsZc4v3TVVb1I2zprMfwOux7AKXWs3n/qV0k9e+X
lPzmmMIKqKBtt4pKF8I+2JRbRhjbhqFZ/LKHe6SyithL96cVtM+yKgMxN1IbXIJU
y5aSGT9EBXYVJBvqVi21uEBKdxYS79rPINS+zLnqEhY94L0xConKgB/P649a/VP9
IxOo/4Zz2HPuwVr1frIB6lptWeWx6GmTug8p4tK7qkns1Mcu08PyJRrWGBf/ZdLb
bakW2Am1N0gV0oGAWvBLawMH+SMEZ11WtyrMyxTGcaKPqrtgG1IW6cJVHvZbZEAw
5CpFBD9z5+O9+rInTxXx2YPH3+EctzkCemcF8F1E/8WIDal/Z0+Io133z4aekncb
ARoBbgPrmQLqSA==
=RmhN
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 05 Jun 2019 07:46:17 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed May 17 13:52:52 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.