panic: mi_switch: did not reenter debugger This panic happens often when setting a breakpoint and then hitting it a few times. I think I see the problem. The bsd code in kern/subr_kdb.c does this: #ifdef SMP if (did_stop_cpus) restart_cpus(stopped_cpus); #endif kdb_active--; The panic is this (mi_switch): /* * Don't perform context switches from the debugger. */ if (kdb_active) { mtx_unlock_spin(&sched_lock); kdb_backtrace(); kdb_reenter(); panic("%s: did not reenter debugger", __func__); } It's an mp-race. It restarts the other CPU's before decrementing kdb_active. If the other CPU races into mi_switch first, a panic is guaranteed. Fix: Decrement kdb_active before restarting cpus. How-To-Repeat: Hit the same breakpoint several times on an SMP box.
Responsible Changed From-To: freebsd-bugs->ups I am currently working on some kdb changes to make SMP debugging easier that will include a fix for the problem. This does NOT imply that I adopted KDB ;-)
State Changed From-To: open->feedback Your last comments implied that you were going to fix this, did that happen? Thanks.
State Changed From-To: feedback->suspended Feedback wasn't received, but it sounds like the problem might still exist.
For the following conditions Product: Base System, Documentation Status: New, Open, In Progress, UNCONFIRMED Assignee: Former FreeBSD committer Reset to default assignee. Reset status to "Open".
The code is quite different now.