Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 May 2003 13:01:46 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        "Daniel C. Sobral" <dcs@tcoip.com.br>
Cc:        Robert Watson <rwatson@FreeBSD.ORG>
Subject:   Re: /dev/null and KSE panic 100% reproducible
Message-ID:  <Pine.BSF.4.21.0305201259280.22764-100000@InterJet.elischer.org>
In-Reply-To: <Pine.BSF.4.21.0305201125490.22764-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0305201259280.22764-100000>