From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 21:54:36 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 8CAE616A41F for ; Fri, 16 Dec 2005 21:54:36 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF94B43D53 for ; Fri, 16 Dec 2005 21:54:35 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 3966801 for multiple; Fri, 16 Dec 2005 16:52:34 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jBGLsSax083701; Fri, 16 Dec 2005 16:54:28 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Anish Mistry Date: Fri, 16 Dec 2005 16:38:58 -0500 User-Agent: KMail/1.8.2 References: <200512161237.15148.mistry.7@osu.edu> <200512161511.10903.jhb@freebsd.org> <200512161527.34667.mistry.7@osu.edu> In-Reply-To: <200512161527.34667.mistry.7@osu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512161638.58917.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1210/Thu Dec 15 10:23:22 2005 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=4.2 tests=ALL_TRUSTED,BIZ_TLD autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-current@freebsd.org Subject: Re: Reproducable Panic on CURRENT and 6.0-RELEASE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 16 Dec 2005 21:54:36 -0000 On Friday 16 December 2005 03:27 pm, Anish Mistry wrote: > On Friday 16 December 2005 03:11 pm, you wrote: > > On Friday 16 December 2005 12:37 pm, Anish Mistry wrote: > > > Here is the offending program/code. The interesting program is > > > avidemux_2.1_branch_anish/avidemux/avidemux2. > > > (It is compiled for CURRENT, and I left all the object code stuff > > > in so it's a bit large 21MB) > > > http://am-productions.biz/docs/avidemux_2.1_branch_anish.tgz > > > > > > First you'll need to compile spidermonkey to be threadsafe so add > > > the following to your lang/spidermonkey/Makefile before > > > installing it: LIB_DEPENDS= nspr4.1:${PORTSDIR}/devel/nspr > > > MAKE_ARGS+= JS_THREADSAFE=YES LDFLAGS="-L${LOCALBASE}/lib > > > -lpthread -lm" > > > CFLAGS+= -I${LOCALBASE}/include/nspr > > > > > > Once a threadsafe spidermonkey is installed to kill the machine > > > you'll need to: > > > cd avidemux_2.1_branch_anish/avidemux > > > ./avidemux2 --run new-features-test.js > > > > > > On CURRENT: > > > kernel trap 12 with interrupts disabled > > > > > > Fatal trap 12: page fault while in kernel mode > > > fault virtual address = 0x68 > > > fault code = supervisor read, page not present > > > instruction pointer = 0x20:0xc04e6f36 > > > stack pointer = 0x28:0xcc9edb3c > > > frame pointer = 0x28:0xcc9edbb0 > > > code segment = base 0x0, limit 0xfffff, type 0x1b > > > = DPL 0, pres 1, def32 1, gran 1 > > > processor eflags = resume, IOPL = 0 > > > current process = 798 (gdb) > > > trap number = 12 > > > panic: page fault > > > > > > #0 doadump () at pcpu.h:165 > > > #1 0xc04bb7eb in boot (howto=260) > > > at /usr/src/sys/kern/kern_shutdown.c:399 > > > #2 0xc04bb353 in panic (fmt=0xc06069a7 "%s") > > > at /usr/src/sys/kern/kern_shutdown.c:555 > > > #3 0xc05e91ba in trap_fatal (frame=0xcc9edafc, eva=104) > > > at /usr/src/sys/i386/i386/trap.c:862 > > > #4 0xc05e96d9 in trap (frame= > > > {tf_fs = 8, tf_es = 40, tf_ds = 40, tf_edi = -1032878460, > > > tf_esi = 1, tf_ebp = -862004304, tf_isp = -862004440, tf_ebx = > > > -1033297504, tf_edx = -1033987232, tf_ecx = 4, tf_eax = 0, > > > tf_trapno = 12, tf_err = 0, tf_eip = -1068601546, tf_cs = 32, > > > tf_eflags = 65687, tf_esp = -1032878356, tf_ss = -1067380424}) > > > at /usr/src/sys/i386/i386/trap.c:273 > > > #5 0xc05db6fa in calltrap () > > > at /usr/src/sys/i386/i386/exception.s:137 > > > #6 0xc04e6f36 in kern_ptrace (td=0xc25e9b60, req=10, pid=1, > > > addr=0x0, data=17) > > > at /usr/src/sys/kern/sys_process.c:802 > > > > On HEAD this is: > > p->p_xthread->td_flags &= ~TDF_XSIG; > > > > If two threads called kern_ptrace() with the same PID and this > > could happen. Hmm, I have no idea how p_xthread is supposed to not > > be racey here in fact. It would be helpful to know what PTRACE > > action it it is trying to do and maybe a KTR trace of the various > > ptrace events leading up to this condition. I have no idea what > > thread you are supposed to act on if p_xthread is NULL either. > > How would I do this? My kdb/ddb skills are prettymuch limited to > getting a backtrace. You could add some new KTR tracepoints to log each request into kern_ptrace() and then do a 'show ktr' at the ddb prompt. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org