Bug 738077 - Pid 1 flagged as init not as systemd
Summary: Pid 1 flagged as init not as systemd
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: systemd-RFE
TreeView+ depends on / blocked
 
Reported: 2011-09-13 20:24 UTC by Jóhann B. Guðmundsson
Modified: 2012-03-13 02:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-13 02:37:07 UTC


Attachments (Terms of Use)

Description Jóhann B. Guðmundsson 2011-09-13 20:24:07 UTC
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 21:58:12 UTC
I should mention that running systemctl daemon-reexec correctly relables 1 to systemd

Comment 2 Michal Schmidt 2011-09-14 09:39:48 UTC
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 09:55:18 UTC
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 10:12:21 UTC
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 23:50:25 UTC
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 17:27:07 UTC
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 16:31:04 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Lennart Poettering 2012-03-13 02:37:07 UTC
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.