From owner-freebsd-current@FreeBSD.ORG Tue Apr 29 00:37:10 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFC3E106564A for ; Tue, 29 Apr 2008 00:37:10 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from gw.sandvine.com (gw.sandvine.com [199.243.201.138]) by mx1.freebsd.org (Postfix) with ESMTP id 6D5848FC14 for ; Tue, 29 Apr 2008 00:37:10 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by gw.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 28 Apr 2008 20:36:08 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id CE8D111707; Mon, 28 Apr 2008 20:36:08 -0400 (EDT) Date: Mon, 28 Apr 2008 20:36:08 -0400 From: Ed Maste To: freebsd-current@freebsd.org, freebsd-net@freebsd.org Message-ID: <20080429003608.GA11308@sandvine.com> References: <20080325200033.GA5444@sandvine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080325200033.GA5444@sandvine.com> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 29 Apr 2008 00:36:09.0042 (UTC) FILETIME=[04788B20:01C8A991] Cc: Subject: Re: panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx 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: Tue, 29 Apr 2008 00:37:10 -0000 On Tue, Mar 25, 2008 at 04:00:33PM -0400, Ed Maste wrote: > GENERIC CURRENT as of this morning. > > panic: _mtx_lock_sleep: recursed on non-recursive mutex if_addr_mtx @ /d2/emaste/HEAD/src/sys/netinet6/ip6_output.c:719 > ... > panic() at panic+0x176 > _mtx_lock_sleep() at _mtx_lock_sleep+0x181 > _mtx_lock_flags() at _mtx_lock_flags+0xe1 > ip6_output() at ip6_output+0xe98 > mld6_sendpkt() at mld6_sendpkt+0x204 > mld6_input() at mld6_input+0x55c > icmp6_input() at icmp6_input+0xf0b > ip6_input() at ip6_input+0xa6d > ... What happens here is that mld6_input() does IF_ADDR_LOCK() to be able to walk the address list, and then ends up needing to send a packet: mld6.c 268 void 269 mld6_input(struct mbuf *m, int off) ... 330 switch(mldh->mld_type) { 331 case MLD_LISTENER_QUERY: ... 371 IF_ADDR_LOCK(ifp); 372 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { ... 387 mld6_sendpkt(in6m, MLD_LISTENER_REPORT, 388 NULL); ... 399 } 400 IF_ADDR_UNLOCK(ifp); And then mld6_sendpkt() calls ip6_output() which needs to take the if_addr_mtx at: ip6_output.c 719 IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m); - Ed