Date: Thu, 16 Jun 2005 19:43:21 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 78647 for review Message-ID: <200506161943.j5GJhLMa046063@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=78647 Change 78647 by jhb@jhb_slimer on 2005/06/16 19:42:33 Add some extra witness checks to catch threads exiting with locks held. Affected files ... .. //depot/projects/smpng/sys/kern/kern_exit.c#95 edit .. //depot/projects/smpng/sys/kern/kern_kse.c#20 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_exit.c#95 (text+ko) ==== @@ -505,6 +505,8 @@ wakeup(p->p_pptr); PROC_UNLOCK(p->p_pptr); + WITNESS_WARN(WARN_PANIC, &p->p_mtx, "process (pid %d) exiting", + p->p_pid); mtx_lock_spin(&sched_lock); critical_exit(); ==== //depot/projects/smpng/sys/kern/kern_kse.c#20 (text+ko) ==== @@ -1304,7 +1304,7 @@ thread_export_context(td, 0); /* * There is something to report, and we own an upcall - * strucuture, we can go to userland. + * structure, we can go to userland. * Turn ourself into an upcall thread. */ td->td_pflags |= TDP_UPCALLING; @@ -1313,6 +1313,8 @@ PROC_LOCK(p); if (kg->kg_upsleeps) wakeup(&kg->kg_completed); + WITNESS_WARN(WARN_PANIC, &p->p_mtx, + "thread exiting in userret"); mtx_lock_spin(&sched_lock); thread_stopped(p); thread_exit();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506161943.j5GJhLMa046063>