On 17/11/14 17:00, Evgeni Golov wrote:
> On 11/17/2014 04:24 PM, Roger Lynn wrote:
>> On 17/11/2014 11:12, Whoopie wrote:
>>> 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 +++
> 
> This is
>  ret = read(freefall_fd, &count, sizeof(count));
> line 1249 from hdapsd.c
> 
>>> 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.
> 
> read() blocks until there is something to read from /dev/freefall.
> 
>> 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?
> 
> No, it should be working, because in the case the hardware logic detects
> a fall, the read will unblock.

I can confirm that shaking the laptop while waiting for hdapsd to to
terminate does make it unblock.

Thanks,

Roger


-- 
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