From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 8 15:22:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97B74106571D for ; Tue, 8 Nov 2011 15:22:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA788FC12 for ; Tue, 8 Nov 2011 15:22:15 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 245C546B09; Tue, 8 Nov 2011 10:22:15 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A9A178A02E; Tue, 8 Nov 2011 10:22:14 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 8 Nov 2011 10:05:43 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111081005.43851.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 08 Nov 2011 10:22:14 -0500 (EST) Cc: Vijay Singh Subject: Re: Panic in 8.1 in softclock(): mutex Giant not owned at ../../../../sys/kern/kern_mutex.c:185 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2011 15:22:15 -0000 On Sunday, November 06, 2011 6:49:43 pm Vijay Singh wrote: > Hackers. I am hitting a panic on 8.1 in the softclock() code. Anyone seen this? > > PANIC : mutex Giant not owned at ../../../../sys/kern/kern_mutex.c:185 > > (kgdb-amd64-6.8-71) bt > #0 breakpoint () at ./machine/cpufunc.h:64 > #1 0xffffffff803d8b82 in kdb_enter (why=0xffffffff806ca339 "panic", > msg=0xffffffff806ca339 "panic") at ../../../../sys/kern/subr_kdb.c:365 > #2 0xffffffff8039adf0 in panic (fmt=0xffffffff806c82d3 "mutex %s not > owned at %s:%d") at ../../../../sys/kern/kern_shutdown.c:950 > #3 0xffffffff80386b2e in _mtx_assert (m=0xffffffff80c8ed40, what=20, > file=0xffffffff806c7d18 "../../../../sys/kern/kern_mutex.c", line=185) > at ../../../../sys/kern/kern_mutex.c:827 > #4 0xffffffff8038528e in unlock_mtx (lock=0xffffffff80c8ed40) at > ../../../../sys/kern/kern_mutex.c:185 > #5 0xffffffff803b73e6 in softclock (arg=0xffffffff80c90f40) at > ../../../../sys/kern/kern_timeout.c:461 > #6 0xffffffff8036436c in intr_event_execute_handlers > (p=0xffffff000413a000, ie=0xffffff000414ad00) at > ../../../../sys/kern/kern_intr.c:1244 > #7 0xffffffff80364443 in ithread_execute_handlers > (p=0xffffff000413a000, ie=0xffffff000414ad00) at > ../../../../sys/kern/kern_intr.c:1257 > #8 0xffffffff8036469f in ithread_loop (arg=0xffffff00021e92e0) at > ../../../../sys/kern/kern_intr.c:1342 > #9 0xffffffff80361d06 in fork_exit (callout=0xffffffff80364590 > , arg=0xffffff00021e92e0, frame=0xffffff80001e7c80) at > ../../../../sys/kern/kern_fork.c:892 > #10 > > (kgdb-amd64-6.8-71) f 5 > #5 0xffffffff803b73e6 in softclock (arg=0xffffffff80c90f40) at > ../../../../sys/kern/kern_timeout.c:461 > 461 class->lc_unlock(c_lock); > (kgdb-amd64-6.8-71) l > 456 lastfunc = c_func; > 457 } > 458 #endif > 459 CTR1(KTR_CALLOUT, "callout %p finished", c); > 460 if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) > 461 class->lc_unlock(c_lock); > 462 skip: > 463 CC_LOCK(cc); > 464 /* > 465 * If the current callout is locally > (kgdb-amd64-6.8-71) i local > c_func = (void (*)(void *)) 0xffffffff8060d550 You'll need to see if there is a way that this routine can drop the lock. If you can reproduce this panic easily, then perhaps try building with KTR and KTR_LOCK traces enabled and use 'show ktr' in ddb to see when this thread dropped Giant. -- John Baldwin