Re: "rtfree: %p has 1 refs"

From: Bruce M. Simpson <bms_at_incunabulum.net>
Date: Tue, 19 Jun 2007 13:01:25 +0100
Rong-en Fan wrote:
> On 6/11/07, Poul-Henning Kamp <phk_at_phk.freebsd.dk> wrote:
>>
>> With this mornings -current I see a lot of
>>
>>         rtfree: 0xc2798d20 has 1 refs
>>         rtfree: 0xc2798d20 has 1 refs
>>         rtfree: 0xc2798d20 has 1 refs
>>         rtfree: 0xc2798d20 has 1 refs
>>         rtfree: 0xc2798d20 has 1 refs
>>         ...
>>
>> I've been playing with ipsec-tools and FAST_IPSEC
>>
>> No other clues right now...

in RTFREE_LOCKED:

		if ((_rt)->rt_refcnt <= 1)			\
			rtfree(_rt);				\

in rtfree:

	RT_REMREF(rt);
	if (rt->rt_refcnt > 0) {
		printf("%s: %p has %lu refs\n", __func__, rt, rt->rt_refcnt);
		goto done;

in RT_REMREF:
#define	RT_REMREF(_rt)	do {					\
	RT_LOCK_ASSERT(_rt);					\
	KASSERT((_rt)->rt_refcnt > 0,				\
		("bogus refcnt %ld", (_rt)->rt_refcnt));	\
	(_rt)->rt_refcnt--;					\

Something is clearly holding a reference to an rtentry. Perhaps the printf should go under #ifdef DIAGNOSTIC.


BMS
} while (0)
	}


>>
>
> I'm seeing this too. I also uses ipsec-tools and FAST_IPSEC.
>
> Regards,
> Rong-En Fan
>
>>
>> -- 
>> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
>> phk_at_FreeBSD.ORG         | TCP/IP since RFC 956
>> FreeBSD committer       | BSD since 4.3-tahoe
>> Never attribute to malice what can adequately be explained by 
>> incompetence.
>> _______________________________________________
>> freebsd-current_at_freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to 
>> "freebsd-current-unsubscribe_at_freebsd.org"
>>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to 
> "freebsd-current-unsubscribe_at_freebsd.org"
Received on Tue Jun 19 2007 - 10:01:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC