Fatal trap at booting after last kmacy@ changes
Yuriy Tsibizov
Yuriy.Tsibizov at gfk.ru
Sat Dec 16 09:42:13 PST 2006
> Last kernel got immediately fatal trap at boot, right after timer probe.
> This is what I write by hand from the console:
>
> Fatal trap 12: page fault while in kernel mode
> fault code: supervisor read, page not present
> stopped at sleepq_add+0xf6: cmpl $0,0(%rax,%eax,8)
>
> stack trace:
> sleepq_add
> cv_timedwait
> _sema_timedwait
> ata_queue_request
> ...
It seems that with INVARIANTS &sq is referenced while sq is NULL...
This should fix it:
Index: subr_sleepqueue.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/subr_sleepqueue.c,v
retrieving revision 1.32
diff -u -r1.32 subr_sleepqueue.c
--- subr_sleepqueue.c 16 Dec 2006 07:50:39 -0000 1.32
+++ subr_sleepqueue.c 16 Dec 2006 17:34:27 -0000
@@ -295,6 +295,7 @@
* into the sleep queue already in use by this wait channel.
*/
if (sq == NULL) {
+ sq = td->td_sleepqueue;
#ifdef INVARIANTS
int i;
for (i = 0; i < NR_SLEEPQS; i++)
@@ -313,7 +314,6 @@
sleepq_max_depth = sc->sc_max_depth;
}
#endif
- sq = td->td_sleepqueue;
LIST_INSERT_HEAD(&sc->sc_queues, sq, sq_hash);
sq->sq_wchan = wchan;
#ifdef INVARIANTS
Yuriy.
More information about the freebsd-current
mailing list