"rtfree: %p has 1 refs"

Bruce M. Simpson bms at incunabulum.net
Tue Jun 19 12:01:39 UTC 2007


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"



More information about the freebsd-current mailing list