From owner-freebsd-net@FreeBSD.ORG Sat Feb 21 14:50:32 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3BFD1065670 for ; Sat, 21 Feb 2009 14:50:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CE0D08FC12 for ; Sat, 21 Feb 2009 14:50:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 67BEC46B51; Sat, 21 Feb 2009 09:50:31 -0500 (EST) Date: Sat, 21 Feb 2009 14:50:31 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: dikshie In-Reply-To: <910e60e80902180150n41a592ffyb62ea53beb24f1ef@mail.gmail.com> Message-ID: References: <910e60e80902180150n41a592ffyb62ea53beb24f1ef@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org Subject: Re: panic: _rw_wlock_hard X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2009 14:50:32 -0000 On Wed, 18 Feb 2009, dikshie wrote: > does anyone see this panic on -HEAD: > > panic: _rw_wlock_hard: recursing but non-recursive rw radix node head @ > /usr/src/sys/net/route.c:831 > > kdb_enter() at kdb_enter+0x3a > panic() at panic+0x136 > _rw_wlock_hard() at _rw_wlock_hard+0x66 > _rw_wlock() at _rw_wlock+0xae > rtquest1_fib() at rtquest1_fib+0x95 > rtquest_fib() at rtquest_fib+0x5e > in_rtquest() at in_rtquest+0x3b > in_rtqkill() at in_rtqkill+0x7f > rn_walktree() at rn_walktree+0x65 > in_rtqtimo() at in_rtqtimo+0xb0 > softclock() at softclock+0x24a > intr_event_execute_handlers() at intr_event_execute_handlers+0x125 > ithread_loop() at ithread_loop+0x9f > fork_exit() at fork_exit+0xb8 > fork_trampoline() at fork_trampoline+0x8 > > -HEAD built on Feb 16 14:26:25 JST. Something like the following may help -- build-tested but not not run-time tested: Index: in_rmx.c =================================================================== --- in_rmx.c (revision 186118) +++ in_rmx.c (working copy) @@ -230,6 +230,8 @@ struct rtentry *rt = (struct rtentry *)rn; int err; + RADIX_NODE_HEAD_WLOCK_ASSERT(ap->rnh); + if (rt->rt_flags & RTPRF_OURS) { ap->found++; @@ -240,7 +242,8 @@ err = in_rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt), rt->rt_gateway, rt_mask(rt), - rt->rt_flags, 0, rt->rt_fibnum); + rt->rt_flags | RTF_RNH_LOCKED, 0, + rt->rt_fibnum); if (err) { log(LOG_WARNING, "in_rtqkill: error %d\n", err); } else {