Date: Thu, 6 Jul 2006 18:30:06 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100784 for review Message-ID: <200607061830.k66IU6ML017165@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100784 Change 100784 by jhb@jhb_mutex on 2006/07/06 18:29:47 Revert this change. It ends up tripping a panic because in the case of an "extra" thread exiting td_ksegrp will be NULL when we do PROC_UNLOCK(). If the proc mtx is contested and this thread has a regular user priority for it's base priority, then in sched_unlend_prio() when we go to fetch the most recent user priority from the ksegroup we panic. Affected files ... .. //depot/projects/smpng/sys/kern/kern_thread.c#91 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_thread.c#91 (text+ko) ==== @@ -579,6 +579,7 @@ ksegrp_unlink(kg); ksegrp_stash(kg); } + PROC_UNLOCK(p); td->td_ksegrp = NULL; PCPU_SET(deadthread, td); } else { @@ -601,9 +602,9 @@ * This includes an EX threaded process that is coming * here via exit1(). (exit1 dethreads the proc first). */ + PROC_UNLOCK(p); } - PROC_UNLOCK(p); td->td_state = TDS_INACTIVE; CTR1(KTR_PROC, "thread_exit: cpu_throw() thread %p", td); cpu_throw(td, choosethread());
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607061830.k66IU6ML017165>