Fatal trap 12 in kern/kern_kse.c:998
Peter Holm
peter at holm.cc
Fri Aug 13 23:40:13 PDT 2004
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x10
fault code = supervisor write, page not present
instruction pointer = 0x8:0xc064fdd0
stack pointer = 0x10:0xd1818c84
frame pointer = 0x10:0xd1818ca4
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = resume, IOPL = 0
current process = 1399 (pthread)
[thread 100689]
Stopped at thread_update_usr_ticks+0x108: orl $0x1,0x10(%eax)
(kgdb) l *0xc064fdd0
0xc064fdd0 is in thread_update_usr_ticks (../../../kern/kern_kse.c:998).
993 }
994 }
995 kg = td->td_ksegrp;
996 if (kg->kg_upquantum && ticks >= kg->kg_nextupcall) {
997 mtx_lock_spin(&sched_lock);
998 td->td_upcall->ku_flags |= KUF_DOUPCALL;
999 mtx_unlock_spin(&sched_lock);
1000 }
1001 return (0);
1002 }
I've included a patch suggestion, that seems to do the trick for me.
--
Peter Holm
-------------- next part --------------
--- kern_kse.c~ Tue Aug 10 03:16:17 2004
+++ kern_kse.c Fri Aug 13 22:23:25 2004
@@ -995,7 +995,9 @@
kg = td->td_ksegrp;
if (kg->kg_upquantum && ticks >= kg->kg_nextupcall) {
mtx_lock_spin(&sched_lock);
- td->td_upcall->ku_flags |= KUF_DOUPCALL;
+ /* fuword can block, check again */
+ if (td->td_upcall)
+ td->td_upcall->ku_flags |= KUF_DOUPCALL;
mtx_unlock_spin(&sched_lock);
}
return (0);
More information about the freebsd-current
mailing list