ipmievd fails to start when a stray PID file exists

Bug #1618378 reported by Dr. Jens Harbott
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipmitool (Ubuntu)
Expired
Medium
Unassigned

Bug Description

root@controller-node14:~# systemctl status ipmievd.service
* ipmievd.service - IPMI event daemon
   Loaded: loaded (/lib/systemd/system/ipmievd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-08-30 09:22:42 UTC; 1min 55s ago
 Main PID: 4537 (code=exited, status=1/FAILURE)

Aug 30 09:22:42 controller-node14 systemd[1]: Starting IPMI event daemon...
Aug 30 09:22:42 controller-node14 ipmievd[14350]: PID file '/var/run/ipmievd.pid0' already exists.
Aug 30 09:22:42 controller-node14 ipmievd[14350]: Perhaps another instance is already running.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Control process exited, code=exited status=1
Aug 30 09:22:42 controller-node14 systemd[1]: Failed to start IPMI event daemon.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Unit entered failed state.
Aug 30 09:22:42 controller-node14 systemd[1]: ipmievd.service: Failed with result 'exit-code'.
root@controller-node14:~# ps axwu|grep ipmi
root 2792 0.0 0.0 0 0 ? SN Aug29 0:06 [kipmi0]
root 14513 0.0 0.0 15292 2004 pts/1 S+ 09:24 0:00 grep --color=auto ipmi
root@controller-node14:~# ls -l /var/run/ipmievd.pid0
-rw-r--r-- 1 root root 5 Aug 29 14:30 /var/run/ipmievd.pid0
root@controller-node14:~# cat /var/run/ipmievd.pid0
4537
root@controller-node14:~# ps axwu|grep 4537
root 14519 0.0 0.0 15292 2104 pts/1 S+ 09:25 0:00 grep --color=auto 4537
root@controller-node14:~#

Expected behaviour: The bogus PID file should be deleted and the daemon started successfully.

Joshua Powers (powersj)
Changed in ipmitool (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Jens,
I have to beg your pardon for so long inactivity. But I'm currently checking outdated bugs so it is a lot of apologizing in general :-/

But about the matter, I wondered about the pidfile as the systemd unit doesn't talk about one.
It seems that you can trigger that without any systemd/init at all.

Just on a system run (yes two times):
$ sudo ipmievd open daemon
$ sudo ipmievd open daemon
PID file '/var/run/ipmievd.pid0' already exists.
Perhaps another instance is already running

After that was clear I considered that the pidfile was misleading and that has to be part of the ipmi code itself.
And I found it in src/ipmievd.c.

Overall it seems that the logic is to call ipmievd_cleanup on a sighandler to clean up.
But there seem to be paths (like the double call I have mentioned above) that go by, stop the daemon and leave the pidfile.

That said that should be reported upstream.
If you'd be so kind to do so and link the bug here to be tracked that would be great.

Changed in ipmitool (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi, for 2x start it is IMO correct that it blocks the next execution, but still it would really be up to upstream to use a improved cleanup.
OTOH it isn't critical enough for Debian or Ubuntu to carry a delta to upstream all the time - so really it would be great if you as the finder of this issue could report there.

I think they still use sourceforge at [1] if I checked correctly.

[1]: https://sourceforge.net/p/ipmitool/bugs/

tags: added: need-upstream-report
Changed in ipmitool (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ipmitool (Ubuntu) because there has been no activity for 60 days.]

Changed in ipmitool (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.