Re: hard-lock with CPU spinning

From: Giorgos Keramidas <keramida_at_ceid.upatras.gr>
Date: Thu, 14 Jun 2007 20:02:30 +0300
On 2007-06-14 18:36, Attilio Rao <attilio_at_freebsd.org> wrote:
>2007/6/14, Giorgos Keramidas <keramida_at_ceid.upatras.gr>:
>> If I leave my laptop idle for a long period of time, it tends to lock up
>> with the CPU fan spinning fast (presumambly because some part of the
>> kernel tries to acquire a lock and spins constantly for it).
>>
>> Unfortunately, this happens when X11 is running and I can't break into
>> DDB to snoop around.
>>
>> I did notice that if I leave a terminal running:
>>
>>    $ while true ; do \
>>          echo -n "$(date '+%Y-%m-%d %H:%M') " ; \
>>          tail -1 /var/log/messages ; \
>>          sleep 10 ; \
>>      done
>>
>> this works as a 'workaround' for the hardlock.
>>
>> The sources of /usr/src have been updated up to:
>>
>>    2007.06.12.15.37.17
>>
>> Any ideas how I could try to debug this?
>
> Recompile the kernel with DDB support (pay attention to disable
> KDB_UNATTENDED), additionally add WITNESS support (paying attention to
> not add WITNESS_SKIPSPIN), even if this wouldn't help in direct
> analysis.
>
> Then, when the kernel hangs, just break into the debugger and print
> out bt, show alllocks, ps.

Unfortunately, I've only been able to reproduce this while X11 is
running, so I can't enter the debugger.  I'll see if I can reproduce
this on a desktop system with a serial console, because entering ddb
on a laptop running X11 without a serial port is at best tricky :)

Thanks for the ddb command tips though :-)
Received on Thu Jun 14 2007 - 15:03:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC