Re: panic: Exit: Single threading fouled up

From: Julian Elischer <julian_at_elischer.org>
Date: Mon, 26 Apr 2004 15:32:33 -0700 (PDT)
On Mon, 26 Apr 2004, Daniel Eischen wrote:
> 
> There is a race in kse_release() and kse_wakeup() that looks
> to have been introduced when sleepqueues were added.  msleep()
> drops the mutex too early (in this case the proc lock) and
> TDF_SINTR gets set after the mutex has been released.  So
> the code in thread_single():
> 
> 				if (force_exit == SINGLE_EXIT) {
> 					if (TD_IS_SUSPENDED(td2)) {
> 						thread_unsuspend_one(td2);
> 					}
> ->					if (TD_ON_SLEEPQ(td2) &&
> ->					    (td2->td_flags & TDF_SINTR)) {
> 						sleepq_abort(td2);
> 					}
> 
> may not abort the thread in the sleep queue.


I don't see imediatly how that would allow two processes 
to get into the same code twice.. or someone could leave the
pointer set after doing single-threading, but
it does show that this is tricky stuff.
Received on Mon Apr 26 2004 - 13:32:38 UTC

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