Am 16.11.2014 um 14:53 schrieb Evgeni Golov:
> Hi Roger,
> 
> [ CCing Whoopie because he has more experience with the freefall code ]
> 
> On 11/15/2014 03:07 PM, Roger Lynn wrote:
> 
>> After adding hdapsd to a newly installed Jessie laptop, it is not being
>> started at bootup, with nothing being logged.
> 
> hdapsd is installed "disabled", you need to call "systemctl enable
> hdapsd" if you want to use it, I might have not documented that part
> properly, sorry.
> 
>> Running "/etc/init.d/hdapsd start"  starts it as expected:
>> Nov 15 14:01:36 brahms hdapsd[10763]: Selected interface: FREEFALL
>> Nov 15 14:01:36 brahms hdapsd[10763]: Uses hardware logic from /dev/freefall
> 
> Cool, which HW is this?
> 
>> However stopping hdapsd fails. Both shutting the laptop down or running
>> "/etc/init.d/hdapsd stop" results in a 90 second timeout after which the
>> process is killed:
>> Nov 15 14:06:48 brahms systemd[1]: hdapsd.service stop-sigterm timed out. 
>> Killing.
>> Nov 15 14:06:48 brahms systemd[1]: hdapsd.service: main process exited, 
>> code=killed, status=9/KILL
>> Nov 15 14:06:48 brahms systemd[1]: Unit hdapsd.service entered failed state.
> 
> Interesting. I do not have any "freefall"-capable HW here, so I never
> tried the code myself. I guess there is something fishy in the "lets end
> now" code when running on freefall, but I have no direct clue.
> 
> Does this happen with sysvinit too?
> 
> Greets
> Evgeni
> 
> 

Hi,

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.

Regards,
Whoopie


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to