Bug 738077 - Pid 1 flagged as init not as systemd
Pid 1 flagged as init not as systemd
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks: systemd-RFE
  Show dependency treegraph
 
Reported: 2011-09-13 16:24 EDT by Jóhann B. Guðmundsson
Modified: 2012-03-12 22:37 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-12 22:37:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jóhann B. Guðmundsson 2011-09-13 16:24:07 EDT
Description of problem:

What's going on here? 

[root@localhost ~]# uname -r
3.1.0-0.rc6.git0.0.fc16.x86_64
[root@localhost ~]# readlink /proc/1/exe
/bin/systemd
[root@localhost ~]# netstat -pan | grep init
unix  2      [ ]         DGRAM                    4718   1/init              /run/systemd/notify
unix  2      [ ACC ]     STREAM     LISTENING     4720   1/init              /run/systemd/private
unix  2      [ ACC ]     SEQPACKET  LISTENING     4754   1/init              @/org/kernel/udev/udevd
unix  2      [ ACC ]     STREAM     LISTENING     4751   1/init              /run/systemd/stdout-syslog-bridge
unix  2      [ ]         DGRAM                    5019   1/init              /run/systemd/shutdownd
unix  24     [ ]         DGRAM                    5021   1/init              /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     7089   1/init              /var/run/rpcbind.sock
unix  2      [ ACC ]     STREAM     LISTENING     7091   1/init              /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     7897   1/init              
unix  2      [ ]         DGRAM                    7847   1/init      



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jóhann B. Guðmundsson 2011-09-13 17:58:12 EDT
I should mention that running systemctl daemon-reexec correctly relables 1 to systemd
Comment 2 Michal Schmidt 2011-09-14 05:39:48 EDT
The initramfs runs it as "/sbin/init". netstat reads /proc/1/cmdline to get the name. After "systemctl daemon-reexec" it gets a new cmdline.
Comment 3 Petr Lautrbach 2011-09-14 05:55:18 EDT
I think 'init' is the right name here. Process 1 is /sbin/init and there is no systemd process in system.

Probably f3b6a3edbce43df47374761529dd663c9a39c612 should be reverted or changed to set name 'init'?
Comment 4 Jóhann B. Guðmundsson 2011-09-14 06:12:21 EDT
Personally I've gotten used to and expect systemd to be there. Anyway all personal prefs aside what matters here is that the name stays consistent through out all releases and distributions. So if we go for "init" that change needs to be backported to F15 as well.
Comment 5 Lennart Poettering 2011-09-19 19:50:25 EDT
We actually explicitly set "comm" to "systemd" when initializing, but we do not patch argv[], because that is so ugly to do if the string we patch in is longer than the original one.

In generally I think we should probably identify us everyhwere with systemd, not with init.

netstat should probably show comm rather than argv[0].
Comment 6 Jóhann B. Guðmundsson 2011-09-21 13:27:07 EDT
Btw if we are considering fixing this can we fix the broken behaviour of inet and display as well what socket/service is listening on 1/

So the output from netstat goes from 

udp 0 0 127.0.0.1:69 0.0.0.0:* 1/systemd

To 

udp 0 0 127.0.0.1:69 0.0.0.0:* 1/systemd/tftp 

Or something similar systemd/tftp.socket or systemd/tftp.service?
Comment 7 Fedora Admin XMLRPC Client 2011-10-20 12:31:04 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 8 Lennart Poettering 2012-03-12 22:37:07 EDT
dracut in F17 will now invoke systemd as systemd, no longer as init. That should fix the issue as we will no always show up under the same name in ps.

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