Re: [long] panic on a recent current

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 19 May 2004 08:13:38 -0400
On Tuesday 18 May 2004 03:05 pm, Thierry Herbelot wrote:
> on a recent -current, running KDE and simultaneously building the world.
>
> As the machine is quite slow, I post this message "raw" (further in the
> message : a gdb session and the full dmesg)
> I'm trying to reproduce the panic.
> The kernel config file is the straight "GENERIC".

Here is a possible fix:

Index: kern_sig.c
===================================================================
RCS file: /usr/cvs/src/sys/kern/kern_sig.c,v
retrieving revision 1.276
diff -u -r1.276 kern_sig.c
--- kern_sig.c  12 Apr 2004 15:56:05 -0000      1.276
+++ kern_sig.c  19 May 2004 12:10:47 -0000
_at__at_ -1953,7 +1953,7 _at__at_
                        td->td_priority = PUSER;
                }
        }
-       if (TD_IS_SLEEPING(td)) {
+       if (TD_ON_SLEEPQ(td)) {
                /*
                 * If thread is sleeping uninterruptibly
                 * we can't interrupt the sleep... the signal will

All the other callers check TD_ON_SLEEPQ() rather than TD_IS_SLEEPING() before 
calling sleepq_abort().  A thread can be marked sleeping w/o being on a sleep 
queue during the timed sleepq race workaround.  Also, for what it's worth, 
4.x's psignal() doesn't do an unsleep() in the case that this code does.

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Wed May 19 2004 - 03:40:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:54 UTC