PERFORCE change 101376 for review
John Baldwin
jhb at FreeBSD.org
Wed Jul 12 13:41:02 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101376
Change 101376 by jhb at 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++)
More information about the p4-projects
mailing list