From owner-freebsd-current@FreeBSD.ORG Thu Aug 5 20:03:24 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A7BF16A4CE; Thu, 5 Aug 2004 20:03:24 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D46C43D62; Thu, 5 Aug 2004 20:03:24 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i75K3IlM069898; Thu, 5 Aug 2004 15:03:18 -0500 (CDT) (envelope-from dan) Date: Thu, 5 Aug 2004 15:03:18 -0500 From: Dan Nelson To: freebsd-current@freebsd.org Message-ID: <20040805200317.GA6978@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-threads@freebsd.org Subject: Fatal trap 12 in kern_ptrace X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2004 20:03:24 -0000 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@allantgroup.com