Re: wait_even_interruptible_timeout(), signal, spin_lock() = system hang

From: Shirish Pargaonkar
Date: Sun Jun 06 2010 - 10:25:51 EST


On Sun, Jun 6, 2010 at 3:00 AM, Maciej Rutecki <maciej.rutecki@xxxxxxxxx> wrote:
> I created a Bugzilla entry at
> https://bugzilla.kernel.org/show_bug.cgi?id=16139
> for your bug report, please add your address to the CC list in there, thanks!
>
> On piÄtek, 28 maja 2010 o 18:44:46 Shirish Pargaonkar wrote:
>> After this sequence of calls, system hangs (smp, x86 box based with
>> .34 kernel), can ping only.
>> I have not been able to break in with Alt Sysrq t, working on that
>>
>> Â Â Â Â rc = wait_event_interruptible_timeout(ses->server->response_q,
>> Â Â Â Â Â Â Â Â Â Â Â Â (midQ->midState != MID_REQUEST_SUBMITTED),
>> Âtimeout); if (rc < 0) {
>> Â Â Â Â Â Â Â Â cFYI(1, ("command 0x%x interrupted", midQ->command));
>> Â Â Â Â Â Â Â Â return -1;
>> Â Â Â Â }
>>
>> and when function that invoking function after coming out with ERESTARTSYS
>> (I kill the command with Ctrl C) calls
>> Âspin_lock(&GlobalMid_Lock);
>>
>> system hangs. ÂIf I sleep before return -1 (e.g. msleep(1), no hang)
>>
>> I do not have to use wait_event_interruptible_timeout and no such problems
>> Âwith wait_event_timeout, it is only when signal/interrupt is involved, I
>> Ârun into this problem
>>
>> Any pointers/ideas what could be happening, would be really really
>> Âappreciated.
>>
>> Regards,
>>
>> Shirish
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at Âhttp://www.tux.org/lkml/
>>
>
> --
> Maciej Rutecki
> http://www.maciek.unixy.pl
>

Thanks. Shaggy told me what I think is happening should not be for
following reasons.

"The process doesn't receive the signal in the
kernel unless it specifically checks for it, or it exits a system call.
There shouldn't be a spinlock held in either situation.
"

I will update the bug as well.

Regards,

Shirish
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/