Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2009 14:50:31 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        dikshie <dikshie@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: panic: _rw_wlock_hard
Message-ID:  <alpine.BSF.2.00.0902211408260.98609@fledge.watson.org>
In-Reply-To: <910e60e80902180150n41a592ffyb62ea53beb24f1ef@mail.gmail.com>
References:  <910e60e80902180150n41a592ffyb62ea53beb24f1ef@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0902211408260.98609>