From owner-freebsd-current@FreeBSD.ORG Mon Sep 3 03:49:56 2007 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 D747316A417 for ; Mon, 3 Sep 2007 03:49:56 +0000 (UTC) (envelope-from csjp@sub.vaned.net) Received: from sub.vaned.net (sub.vaned.net [205.200.235.40]) by mx1.freebsd.org (Postfix) with ESMTP id A75D313C46A for ; Mon, 3 Sep 2007 03:49:56 +0000 (UTC) (envelope-from csjp@sub.vaned.net) Received: by sub.vaned.net (Postfix, from userid 1001) id E3BE41722F; Sun, 2 Sep 2007 22:47:54 -0500 (CDT) Date: Sun, 2 Sep 2007 22:47:54 -0500 From: "Christian S.J. Peron" To: Hugo Message-ID: <20070903034754.GA79704@sub.vaned.net> References: <46DA0C5E.1050506@barafranca.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <46DA0C5E.1050506@barafranca.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-current@FreeBSD.ORG Subject: Re: rtfree: 0xc3e377f8 has 1 refs 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: Mon, 03 Sep 2007 03:49:57 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Basically, this looks like a side effect of calling rtfree() on a route when we dont hold the last reference. In reality we should be using the RTFREE()/REFREE_LOCKED() helper macros which manage reference counts in this case. I have attached a patch, please let me know if this helps. BTW, nice hostname :) On Sun, Sep 02, 2007 at 02:05:34AM +0100, Hugo wrote: > Hi list, > > While experimenting with IPv6 on a spare server, I noticed the following in > the logs: > > Sep 2 00:24:33 deserteagle kernel: rtfree: 0xc3e377f8 has 1 refs > Sep 2 00:25:01 deserteagle last message repeated 139 times > Sep 2 00:25:01 deserteagle kernel: rtfree: 0xc3e377f8 has 1 refs > Sep 2 00:25:17 deserteagle last message repeated 401 times > Sep 2 00:27:38 deserteagle last message repeated 1204 times > Sep 2 00:35:32 deserteagle last message repeated 1032 times > Sep 2 00:47:03 deserteagle last message repeated 164 times > > > Connectivity is fine, but these messages are filling up the logs. The only > traffic that particular server gets right now is ssh (over ipv6, altough by > looking at the logs the messages show up even before I login) > > > uname: > 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sat Sep 1 23:07:18 UTC 2007 > klr@deserteagle.barafranca.com:/usr/obj/usr/src/sys/DESERTEAGLE i386 > > > netstat -rn: > Internet6: > Destination Gateway Flags > Netif Expire > ::/96 ::1 UGRS > lo0 => > default 2002:c058:6301:: UGS > stf0 > ::1 ::1 UHL > lo0 > ::ffff:0.0.0.0/96 ::1 UGRS > lo0 > 2002::/24 ::1 UGRS > lo0 => > 2002::/16 2002:4655:c4f2::1 U > stf0 > 2002:4655:c4f2::/48 link#1 UC > em0 > 2002:4655:c4f2::1 link#4 UHL > lo0 > 2002:4655:c4f2::ac1d:242 00:0c:f1:bf:2a:54 UHL > lo0 > 2002:4655:c4f2::ac1d:243 00:0c:f1:bf:2a:54 UHL > lo0 > 2002:7f00::/24 ::1 UGRS > lo0 > 2002:e000::/20 ::1 UGRS > lo0 > 2002:ff00::/24 ::1 UGRS > lo0 > fe80::/10 ::1 UGRS > lo0 > fe80::%em0/64 link#1 UC > em0 > fe80::20c:f1ff:febf:2a54%em0 00:0c:f1:bf:2a:54 UHL > lo0 > fe80::%lo0/64 fe80::1%lo0 U > lo0 > fe80::1%lo0 link#3 UHL > lo0 > ff01:1::/32 link#1 UC > em0 > ff01:3::/32 ::1 UC > lo0 > ff02::/16 ::1 UGRS > lo0 > ff02::%em0/32 link#1 UC > em0 > ff02::%lo0/32 ::1 UC > lo0 > > > > I have never seen this error before. On a 6.2-RELEASE-p1 box at home (which > also got ipv6 connectivity) I do not see these errors. > > Ideas? > > Best regards, > > Hugo > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer --bg08WKrSYDhXBjb5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="rt.diff" Index: net/if_stf.c =================================================================== RCS file: /usr/ncvs/src/sys/net/if_stf.c,v retrieving revision 1.59 diff -u -r1.59 if_stf.c --- net/if_stf.c 22 Oct 2006 11:52:15 -0000 1.59 +++ net/if_stf.c 27 Aug 2007 23:51:19 -0000 @@ -607,10 +607,10 @@ (u_int32_t)ntohl(sin.sin_addr.s_addr)); #endif if (rt) - rtfree(rt); + RTFREE_LOCKED(rt); return -1; } - rtfree(rt); + RTFREE_LOCKED(rt); } return 0; Index: netinet/in_gif.c =================================================================== RCS file: /usr/ncvs/src/sys/netinet/in_gif.c,v retrieving revision 1.36 diff -u -r1.36 in_gif.c --- netinet/in_gif.c 10 May 2007 15:58:47 -0000 1.36 +++ netinet/in_gif.c 27 Aug 2007 23:48:04 -0000 @@ -374,10 +374,10 @@ (u_int32_t)ntohl(sin.sin_addr.s_addr)); #endif if (rt) - rtfree(rt); + RTFREE_LOCKED(rt); return 0; } - rtfree(rt); + RTFREE_LOCKED(rt); } return 32 * 2; --bg08WKrSYDhXBjb5--