On 17/11/2014 11:12, Whoopie wrote:
I can reproduce the issue:
$ sudo /etc/init.d/hdapsd start
* Starting IBM Hard Disk Active Protection System (HDAPS) daemon hdapsd
[ OK ]
real 0m2.059s
user 0m0.050s
sys 0m0.023s
$ time sudo /etc/init.d/hdapsd stop
* Stopping IBM Hard Disk Active Protection System (HDAPS) daemon hdapsd
[ OK ]
real 0m30.079s
user 0m0.083s
sys 0m0.285s
It looks like hdapsd doesn't terminate in time, it get's KILLed after 30
seconds, see the do_stop() function in /etc/init.d/hdapsd:
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
--name $NAME
strace shows:
17912 --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=18045, si_uid=0}
---
17912 rt_sigaction(SIGTERM, {0x402cb0, [TERM], SA_RESTORER|SA_RESTART,
0x7f779b2aec30}, {0x402cb0, [TERM], SA_RESTORER|SA_RESTART, 0x7f779b2aec30}, 8)
= 0
17912 rt_sigreturn() = 0
17912 read(3, <unfinished ...>
17912 +++ killed by SIGKILL +++
Adding some debugging output, the SIGTERM handler is called, but the while loop is not
stopped, as the new "running" value doesn't find its way into the main process.
But here, my coding skills stop, sorry.
I started looking at this yesterday, but ran out of time. I assume the code
is getting stuck in a loop or function call, which means it never returns to
the main while loop in main(). This is slightly worrying: if the main loop
is not running does that meant the hard disc protection is not working?
Any signal apart from SIGTERM and SIGUSR1 is not caught and causes an
immediate exit without shutting down nicely.
Should the instructions at:
https://www.debian.org/doc/manuals/debian-reference/ch12.en.html#_debugging_the_debian_package
build me a package with debugging enabled?
Roger
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org