Fatal trap 12 in kern_ptrace
Dan Nelson
dnelson at allantgroup.com
Thu Aug 5 13:03:24 PDT 2004
Recently I've been seeing libpthreaded processes just hang suddenly. ps
shows them in the STOPped state, and ps -H shows that all threads are
idle except for one, which is waiting on a lock (I've seen ufs and wait
on different occasions). Killing the process results in an instant
system freeze. I tried gdb'ing one this time, and was rewarded with
the following trap:
kernel trap 12 with interrupts disabled
Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 03
fault virtual address = 0x44
fault code = supervisor write, page not present
instruction pointer = 0x8:0xc058ae4c
stack pointer = 0x10:0xdef5db84
frame pointer = 0x10:0xdef5dc04
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = resume, IOPL = 0
current process = 63683 (gdb)
At this point the system froze so I couldn't get a full stack trace,
but:
$ addr2line -f -e kernel.debug 0xc058ae4c
kern_ptrace
../../../kern/sys_process.c:659
658 if (saved_pid <= PID_MAX) {
659 p->p_xthread->td_flags &= ~TDF_XSIG;
660 p->p_xthread->td_xsig = data;
It looks like p_xthread is null when it shouldn't be. This is an Aug 02
kernel, so no PREEMPTION.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-threads
mailing list