Date: Sat, 14 Aug 2004 08:40:10 +0200 From: Peter Holm <peter@holm.cc> To: current@freebsd.org Subject: Fatal trap 12 in kern/kern_kse.c:998 Message-ID: <20040814064010.GA79126@peter.osted.lan>
next in thread | raw e-mail | index | archive | help
--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
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
--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kern_kse.diff"
--- 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);
--rwEMma7ioTxnRzrJ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040814064010.GA79126>
