/dev/null and KSE panic 100% reproducible
Julian Elischer
julian at elischer.org
Tue May 20 13:01:50 PDT 2003
On Tue, 20 May 2003, Julian Elischer wrote:
> Someone put the following code into kern/kern_switch.c
> /*
> * Only allow non system threads to run in panic
> * if they are the one we are tracing. (I think.. [JRE])
> */
> if (panicstr && ((td->td_proc->p_flag & P_SYSTEM) == 0 &&
> (td->td_flags & TDF_INPANIC) == 0))
> goto retry;
>
>
> It has the effect of throwing away threads that it has taken off teh run
> queue if we are in a panic.
>
> at a later time anything that goes through these threads will assume
> they are still on teh run queue and panic becasue they are not..
>
> try the following:
>
> change it to:
>
> if (panicstr && ((td->td_proc->p_flag & P_SYSTEM) == 0 &&
> (td->td_flags & TDF_INPANIC) == 0)) {
> /* note that it is no longer on the run queue */
> TD_SET_CAN_RUN(td);
> goto retry;
> }
>
>
> if it fails you may try TD_SET_SUSPENDED(td) instead, but I think this
> is better.
>
Note, this panic can only happen if you are already panicing, as seen
below..
This is why I haven't seen it.
> >
> > panic: No strategy on dev null responsible for buffer 0xc776ab90
> >
> > syncing disks, buffers remaining... 2230 2230 2229 2229 2229 2228 2228
> > 2228 2228 2228 2228 panic: KSE not on run queue
More information about the freebsd-current
mailing list