From owner-freebsd-questions Tue Dec 22 19:07:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA13872 for freebsd-questions-outgoing; Tue, 22 Dec 1998 19:07:32 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA13863 for ; Tue, 22 Dec 1998 19:07:02 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id NAA05819; Wed, 23 Dec 1998 13:26:25 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id NAA12115; Wed, 23 Dec 1998 13:26:25 +1030 (CST) Message-ID: <19981223132624.U85005@freebie.lemis.com> Date: Wed, 23 Dec 1998 13:26:24 +1030 From: Greg Lehey To: Mike Tancsa , questions@FreeBSD.ORG Subject: Re: /kernel: rtfree: 0xf2b02700 not freed (neg refs) References: <3.0.5.32.19981221210103.014c0e80@granite.sentex.ca> <3.0.5.32.19981221210103.014c0e80@granite.sentex.ca> <19981222124702.T85005@freebie.lemis.com> <3.0.5.32.19981221214743.017c9d70@granite.sentex.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <3.0.5.32.19981221214743.017c9d70@granite.sentex.ca>; from Mike Tancsa on Mon, Dec 21, 1998 at 09:47:43PM -0500 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 21 December 1998 at 21:47:43 -0500, Mike Tancsa wrote: > At 12:47 PM 12/22/98 +1030, Greg Lehey wrote: >> On Monday, 21 December 1998 at 21:01:03 -0500, Mike Tancsa wrote: >>> >>> I searched through the mailing lists and the only other reference I could >>> find is someone else with a similar setup.. i.e. running FreeBSD stable and >>> gated. Is it a bug ? Gated ? The O/S ? How can I start to track down >>> the cause of it. Again, its FreeBSD stable (as of yesterday), running >>> Gated 3.5.9 with ipfw enabled. It was suggested it might be bad memory. If >>> that were the case, would the bad memory cause other problems ? >> >> How about describing the problem? > > Sorry, didnt mean to be so terse about the problem. Basically, I am not > even sure if it is a problem to worry about. As I mentioned, I am running > a FreeBSD stable box with gated 3.5.9 taking a full view, advertising a > couple of /24s to my upstream. I have 2 border routers. Both are the same > hardware. One is a 2.2.7 RELEASE box with an Etinc serial card. That one > works quite well with no such messages as above. The other is an fxp only > box running gated 3.5.9 with no other purpose in life. Since deploying it > a few days ago, I have had my kern.* syslog fill with the above messages. > I am not sure if it is something to worry about or not. The gated.conf > file is fairly straightforward at this point and identical to the other > border router's config, save for the AS and peer address differences of > course. > > In short, a) I am not clear as to the meaning of the message It comes from a kernel function called (wait for it) rtfree, which frees routes from the routing table. The code is: /* * decrement the reference count by one and if it reaches 0, * and there is a close function defined, call the close function */ rt->rt_refcnt--; if(rnh->rnh_close && rt->rt_refcnt == 0) { rnh->rnh_close((struct radix_node *)rt, rnh); } /* * If we are no longer "up" (and ref == 0) * then we can free the resources associated * with the route. */ if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_UP) == 0) { if (rt->rt_nodes->rn_flags & (RNF_ACTIVE | RNF_ROOT)) panic ("rtfree 2"); /* * the rtentry must have been removed from the routing table * so it is represented in rttrash.. remove that now. */ rttrash--; #ifdef DIAGNOSTIC if (rt->rt_refcnt < 0) { printf("rtfree: %p not freed (neg refs)\n", rt); return; } #endif Somehow the reference count is going negative. It would be nice to find out how that happens, but it's probably not dangerous as long as you're not ending up with conflicting routes in the routing table. The message could be more specific. For example, it could print the value of rt->rt_refcnt. If it's a small negative number, it might indicate a housekeeping problem. If it's a large negative number, it could represent corruption. > b) Is it something to worry about Are you having any problems? It's probably worthwhile looking at your routing table and deciding whether it makes sense or not. > c) if its not a bug, where should I look to find the cause of it. Well, it's definitely a bug, the only question is, how serious is it? I can't make up my mind whether it's a gated bug, a kernel networking bug or just possibly an error in the information you're getting. About the best thing you can do here is to put in a PR, but there's a good chance it won't get looked at in a hurry unless it's causing you lots of trouble. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message