Date: Wed, 12 Jul 2006 13:41:01 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 101376 for review Message-ID: <200607121341.k6CDf1vK037983@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101376 Change 101376 by jhb@jhb_mutex on 2006/07/12 13:40:21 Check db_pager_quit in 'show threadchain', 'show lockchain', and 'show allchains'. Otherwise 'show threadchain' could loop forever during a deadlock. Affected files ... .. //depot/projects/smpng/sys/kern/subr_turnstile.c#29 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_turnstile.c#29 (text+ko) ==== @@ -1046,7 +1046,7 @@ * Follow the chain. We keep walking as long as the thread is * blocked on a turnstile that has an owner. */ - for (;;) { + while (!db_pager_quit) { db_printf("%sthread %d (pid %d, %s) ", prefix, td->td_tid, td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name : td->td_proc->p_comm); @@ -1110,6 +1110,8 @@ db_printf("chain %d:\n", i++); print_threadchain(td, " "); } + if (db_pager_quit) + return; } } } @@ -1122,6 +1124,8 @@ struct turnstile *ts; int i; + if (db_pager_quit) + return; for (i = 0; i < indent; i++) db_printf(" "); print_thread(td, "thread "); @@ -1137,6 +1141,8 @@ struct thread *td; int i; + if (db_pager_quit) + return; lock = ts->ts_lockobj; class = LOCK_CLASS(lock); for (i = 0; i < indent; i++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607121341.k6CDf1vK037983>