| Summary: | calcru calls printf while holding a spin lock | ||
|---|---|---|---|
| Product: | Base System | Reporter: | will <will> |
| Component: | kern | Assignee: | Remko Lodder <remko> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
will
2001-09-10 10:00:01 UTC
On Mon, 10 Sep 2001, Ville-Pertti Keinonen wrote: > >Description: > A machine that previously frequently reported problems with > microuptime() going backwards in calcru started crashing after a > recent update. > > I'm just guessing based on the stack trace and the panic message > (and this is the first time I look at anything related to SMPng > locking), but it seems that calcru calls printf which eventually > tries to wake up another process and grab allproc_lock while > sched_lock is held... > > This seems like an obvious enough bug that it should not require > further details. This is a bug in printf(). printf() must work when ordinary spinlocks like sched_lock are held (for debugging). Known bugs in printf(): - the syscons console driver is not reentrant. The corresponding "microtime() goes backwards" printf() in mi_switch() was ifdefed out a long time ago to avoid panicing for this bug. - the TIOCCONS ioctl causes ordinary printf()s to go to a tty (usually a pty). This can never have worked for printf()s from interrupt handlers and now causes a panic instead of random misbehaviour when printf() is called with a spinlock held. Workaround: always use a serial console and don't permit it to be stolen by TIOCCONS. Bruce State Changed From-To: open->feedback Is this still relevant for recent 6.x versions of FreeBSD? Responsible Changed From-To: freebsd-bugs->remko grab the pr State Changed From-To: feedback->closed feedback timeout |