From owner-freebsd-current@FreeBSD.ORG Wed Aug 18 04:04:40 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 9936D16A4CE for ; Wed, 18 Aug 2004 04:04:40 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17CEB43D5C for ; Wed, 18 Aug 2004 04:04:40 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i7I42j1L036240; Wed, 18 Aug 2004 00:02:45 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i7I42iCJ036237; Wed, 18 Aug 2004 00:02:45 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 18 Aug 2004 00:02:44 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Jun Kuriyama In-Reply-To: <7m7jrxcmen.wl@black.imgsrc.co.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Current Subject: Re: panic: lock (sleep mutex) inp not locked @ /usr/src/sys/netinet6/in6_pcb.c:710 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: Wed, 18 Aug 2004 04:04:40 -0000 On Wed, 18 Aug 2004, Jun Kuriyama wrote: > This is current kernel as of 2004.08.17.04.10.00+00. > > panic: lock (sleep mutex) inp not locked @ > /usr/src/sys/netinet6/in6_pcb.c:710 Hmm. This code is somewhat more spaghetti than I thought. In the IPv4 version, we check the return value of the notify function to decide if we need to unlock. Something like the following may fix this: Index: in6_pcb.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/in6_pcb.c,v retrieving revision 1.59 diff -u -r1.59 in6_pcb.c --- in6_pcb.c 14 Aug 2004 15:32:20 -0000 1.59 +++ in6_pcb.c 18 Aug 2004 04:02:00 -0000 @@ -705,9 +705,11 @@ } do_notify: - if (notify) - (*notify)(inp, errno); - INP_UNLOCK(inp); + if (notify) { + if ((*notify)(inp, errno)) + INP_UNLOCK(inp); + } else + INP_UNLOCK(inp); } INP_INFO_WUNLOCK(pcbinfo); splx(s); Do you have a dump for this? If so, is there any chance you could tell me what function 'notify' was set to point to, and what the value of 'inp' is there? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research > cpuid = 1; > KDB: enter: panic > [thread 100012] > Stopped at kdb_enter+0x2b: nop > db> trace > kdb_enter(c0679e1c) at kdb_enter+0x2b > panic(c067d733,c068df54,c0688ab3,c0686de5,2c6) at panic+0x131 > witness_unlock(c3b4084c,8,c0686de5,2c6) at witness_unlock+0xbc > _mtx_unlock_flags(c3b4084c,0,c0686de5,2c6) at _mtx_unlock_flags+0x5b > in6_pcbnotify(c0709d40,e4d3abb0,1600,e4d3abd0,9bed) at in6_pcbnotify+0x26d > tcp6_ctlinput(6,e4d3abb0,e4d3ab80) at tcp6_ctlinput+0xf0 > icmp6_notify_error(c3ad5b00,28,4c,6) at icmp6_notify_error+0x70e > icmp6_input(e4d3acd4,e4d3ac74,3a,0,3a) at icmp6_input+0xc14 > ip6_input(c3ad5b00) at ip6_input+0xd22 > netisr_processqueue(c0708ca4) at netisr_processqueue+0x6e > swi_net(0) at swi_net+0x88 > ithread_loop(c3461b80,e4d3ad48,c3461b80,c04de148,0) at ithread_loop+0x124 > fork_exit(c04de148,c3461b80,e4d3ad48) at fork_exit+0xa4 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xe4d3ad7c, ebp = 0 --- > > > -- > Jun Kuriyama // IMG SRC, Inc. > // FreeBSD Project > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >