I found that the dbus-daemon did not got respawn when it was kill. After I killed dbus-daemon, the dbus-daemon pid gone (not shown in ps command), but upstart initctl reported that dbus-daemon is still running.
Here are the steps I performed:
1) I listed the dbus-daemon pid to make sure it's running, and it had pid 1031.
bash-3.00# ps axg | grep dbus-daemon
1031 ? Ss 0:00 /usr/bin/dbus-daemon --fork --system
1060 ? R+ 0:00 grep dbus-daemon
2) Then checked whether the job is running:
bash-3.00# /opt/upstart/sbin/initctl status systembus
systembus running
3) Killed the dbus-daemon process, and verified pid 1031 is gone:
bash-3.00# pidof dbus-daemon | xargs kill
bash-3.00# ps axg | grep dbus-daemon
1066 ? R+ 0:00 grep dbus-daemon
4) After the kill above, upstart did not respawn dbus-daemon. Upstart think it's still alive:
bash-3.00# /opt/upstart/sbin/initctl status systembus
systembus running
5) Even when I had explicitly stop & start the job again, I did not see the dbus-daemon launched:
bash-3.00# /opt/upstart/sbin/initctl stop systembus
bash-3.00# /opt/upstart/sbin/initctl status systembus
systembus not running
bash-3.00# ps axg | grep dbus-daemon
bash-3.00# /opt/upstart/sbin/initctl start systembus
init: systembus main process (1076) killed by TRAP signal
init: systembus main process ended, respawning
bash-3.00# /opt/upstart/sbin/initctl status systembus
systembus running
bash-3.00# ps axg | grep dbus-daemon
1079 ? R+ 0:00 grep dbus-daemon
Here is my 'systembus' job script that start the dbus-daemon:
bash-3.00# cat /etc/init/jobs.d/systembus
# DBUS system daemon
#
# started until it is shut down again.
start on stopped rc2 or stopped rc3 or stopped rc4 or stopped rc5
I got similar problem.
I found that the dbus-daemon did not got respawn when it was kill. After I killed dbus-daemon, the dbus-daemon pid gone (not shown in ps command), but upstart initctl reported that dbus-daemon is still running.
Here are the steps I performed:
1) I listed the dbus-daemon pid to make sure it's running, and it had pid 1031. dbus-daemon --fork --system
bash-3.00# ps axg | grep dbus-daemon
1031 ? Ss 0:00 /usr/bin/
1060 ? R+ 0:00 grep dbus-daemon
2) Then checked whether the job is running: sbin/initctl status systembus
bash-3.00# /opt/upstart/
systembus running
3) Killed the dbus-daemon process, and verified pid 1031 is gone:
bash-3.00# pidof dbus-daemon | xargs kill
bash-3.00# ps axg | grep dbus-daemon
1066 ? R+ 0:00 grep dbus-daemon
4) After the kill above, upstart did not respawn dbus-daemon. Upstart think it's still alive: sbin/initctl status systembus
bash-3.00# /opt/upstart/
systembus running
5) Even when I had explicitly stop & start the job again, I did not see the dbus-daemon launched: sbin/initctl stop systembus sbin/initctl status systembus sbin/initctl start systembus sbin/initctl status systembus
bash-3.00# /opt/upstart/
bash-3.00# /opt/upstart/
systembus not running
bash-3.00# ps axg | grep dbus-daemon
bash-3.00# /opt/upstart/
init: systembus main process (1076) killed by TRAP signal
init: systembus main process ended, respawning
bash-3.00# /opt/upstart/
systembus running
bash-3.00# ps axg | grep dbus-daemon
1079 ? R+ 0:00 grep dbus-daemon
Here is my 'systembus' job script that start the dbus-daemon: jobs.d/ systembus
bash-3.00# cat /etc/init/
# DBUS system daemon
#
# started until it is shut down again.
start on stopped rc2 or stopped rc3 or stopped rc4 or stopped rc5
stop on runlevel 0 or runlevel 6
export PATH=/opt/ upstart/ sbin:$PATH
respawn
respawn limit 4 60
expect fork dbus-daemon --fork --system
exec /usr/bin/