From owner-freebsd-current@FreeBSD.ORG Mon May 16 15:35:18 2005 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 DE90A16A4CE for ; Mon, 16 May 2005 15:35:18 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEBD943D8F for ; Mon, 16 May 2005 15:35:17 +0000 (GMT) (envelope-from freebsd-current@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DXhbM-0003d0-Jx for freebsd-current@freebsd.org; Mon, 16 May 2005 17:33:52 +0200 Received: from mulder.f5.com ([205.229.151.150]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2005 17:33:52 +0200 Received: from atkin901 by mulder.f5.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 May 2005 17:33:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: othermark Date: Mon, 16 May 2005 08:33:14 -0700 Lines: 53 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: mulder.f5.com User-Agent: KNode/0.9.0 Sender: news Subject: SMP hard lock with libpthread (thread X holds Y but isn't blocked on a lock) 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: Mon, 16 May 2005 15:35:19 -0000 I have an application that uses shared memory/threads and is linked with libpthread, running on May 10 -current. Every time I run it, after a few minutes *poof* hard lock on a SMP box. All debug options are enabled in the kernel, but it won't break to debugger. Here's what appears on the console, and addr2line output follows: kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 01 fault virtual address = 0x4 fault code = supervisor read, page not present instruction pointer = 0x20:0xc06b5dd9 stack pointer = 0x28:0xe76eeb4c frame pointer = 0x28:0xe76eeb74 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = resume, IOPL = 0 current process = 640 (tgen) # addr2line -e kernel.debug 0xc06b5dd9 /usr/src/sys/kern/subr_turnstile.c:226 # ls -l /boot/kernel total 13920 -r-xr-xr-x 1 root wheel 7102901 May 10 17:15 kernel 215 #ifndef SMP 216 /* 217 * For UP, we check to see if td is curthread (this shou 217 ldn't 218 * ever happen however as it would mean we are in a dead 218 lock.) 219 */ 220 KASSERT(td != curthread, ("Deadlock detected")); 221 #endif 222 223 /* 224 * If we aren't blocked on a lock, we should be. 225 */ 226 KASSERT(TD_ON_LOCK(td), ( 227 "thread %d(%s):%d holds %s but isn't blocked on a lo 227 ck\n", 228 td->td_tid, td->td_proc->p_comm, td->td_state, 229 ts->ts_lockobj->lo_name)); -- othermark atkin901 at nospam dot yahoo dot com (!wired)?(coffee++):(wired);