Bug 1393923 - My system is booting with /dev/ptmx -> /dev/pts/ptmx for some strange reason.
Summary: My system is booting with /dev/ptmx -> /dev/pts/ptmx for some strange reason.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-10 16:03 UTC by Daniel Walsh
Modified: 2016-11-12 12:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-12 12:05:44 UTC
Type: Bug


Attachments (Terms of Use)

Description Daniel Walsh 2016-11-10 16:03:58 UTC
Could this be a systemd bug?

I see some code inside of systemd that does this when running containers.

rpm -q systemd
systemd-231-11.fc26.x86_64

uname -r
4.9.0-0.rc4.git0.1.1.secnext.fc26.x86_64


Only started happening a few days ago, but not sure if I had not rebooted for a while.

Comment 1 Daniel Walsh 2016-11-10 16:04:41 UTC
When this happens all pseudo terminals start getting permission denied.

Comment 2 Zbigniew Jędrzejewski-Szmek 2016-11-10 19:38:27 UTC
Systemd does that when starting service with PrivateDevices=yes. 

# /etc/systemd/system/test-ptmx.service
[Unit]

[Service]
ExecStart=/bin/ls -l /dev/ptmx /dev/pts/ptmx
PrivateDevices=yes

Nov 10 14:35:12 laptop ls[25739]: lrwxrwxrwx. 1 root root    8 Nov 10 14:35 /dev/ptmx -> pts/ptmx
Nov 10 14:35:12 laptop ls[25739]: c---------. 1 root root 5, 2 Nov 10 00:19 /dev/pts/ptmx

Is it possible that you are running from inside such a service? If not, do you have any such services running (systemd-hostnamed,journal-remote,journal-gatewayd,journal-upload,localed,resolved,timesyncd), and this somehow "leaked" through some namespace screwup?

Comment 3 Daniel Walsh 2016-11-12 11:51:51 UTC
Not sure what it would mean to boot the system from within a service.

Here is all the PrivateDev that I see.

 grep -i PrivateDev -r /etc/systemd/ /lib/systemd/
Binary file /lib/systemd/libsystemd-shared-231.so matches
Binary file /lib/systemd/systemd matches
/lib/systemd/system/systemd-hostnamed.service:PrivateDevices=yes
/lib/systemd/system/mlocate-updatedb.service:PrivateDevices=true
/lib/systemd/system/systemd-localed.service:PrivateDevices=yes
/lib/systemd/system/systemd-timesyncd.service:PrivateDevices=yes

Does systemd do this if it thinks that it is running inside of a container?

Comment 4 Daniel Walsh 2016-11-12 12:05:44 UTC
Found the problem.  Systemd is not related. Sorry for bothering you.


Note You need to log in before you can comment on or make changes to this bug.