From owner-freebsd-current@FreeBSD.ORG Fri Dec 28 11:03:50 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66B2E16A41B for ; Fri, 28 Dec 2007 11:03:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 1BFD113C448 for ; Fri, 28 Dec 2007 11:03:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id 5BA6F1B10EE7; Fri, 28 Dec 2007 11:46:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 Received: from [10.1.1.2] (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 9B38F1B10ED2; Fri, 28 Dec 2007 11:45:58 +0100 (CET) Message-ID: <4774D3DF.90802@moneybookers.com> Date: Fri, 28 Dec 2007 12:45:51 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Attila Nagy References: <4774C7A4.5070303@fsn.hu> In-Reply-To: <4774C7A4.5070303@fsn.hu> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/5271/Fri Dec 28 09:03:52 2007 on blah.cmotd.com X-Virus-Status: Clean Cc: current@freebsd.org Subject: Re: rtfree: 0xc5caad98 has 2 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: Fri, 28 Dec 2007 11:03:50 -0000 Hi Attila, Attila Nagy wrote: > Hello, > > I have an i386 7.0-PRERELEASE #12: Thu Dec 27 17:46:49 CET 2007, with > an em and two fxp interfaces in an IPv4-only setup with some jails and > a pf route-to (if that counts) line. > > The machine itself runs some mail related stuff (postfix, cyrus, > openldap, etc) on a ZFS pool. > > The problem is with the default kernel I get tons of similar messages: > Dec 27 12:38:40 artax kernel: rtfree: 0xc5caad98 has 1 refs > Dec 27 12:39:03 artax last message repeated 24 times > Dec 27 12:39:03 artax kernel: rtfree: 0xc5caad98 has 2 refs > Dec 27 12:39:03 artax kernel: rtfree: 0xc5caad98 has 1 refs > Dec 27 12:39:04 artax last message repeated 64 times > Dec 27 12:39:04 artax kernel: rtfree: 0 > Dec 27 12:39:04 artax kernel: xc5caad98 has 1 refs > Dec 27 12:39:04 artax kernel: > Dec 27 12:39:04 artax kernel: rtfree: 0xc5caad98 > Dec 27 12:39:04 artax kernel: has 1 refs > Dec 27 12:39:04 artax kernel: > Dec 27 12:39:04 artax kernel: rtfree: 0xc5caad98 has 1 refs > Dec 27 12:39:04 artax kernel: > Dec 27 12:39:04 artax kernel: rtfree: 0xc5caad98 h > Dec 27 12:39:04 artax kernel: s 1 refs > Dec 27 12:39:04 artax kernel: > Dec 27 12:39:04 artax kernel: rtfree > Dec 27 12:39:04 artax kernel: 0xc5caad98 has 1 refs > > Besides these messages fill up the logs and are annoying, the machine > crashes minutes after it has been started. > I found out that replacing rtfree() calls in the kernel to > RTFREE_LOCKED() not only makes the above messages disappear, but helps > the machine to survive and run for days. Look at this: http://www.freebsd.org/cgi/query-pr.cgi?pr=117913 > > The only places where there are plain rtfree calls are in the kernel > (and where I've replaced them to RTFREE_LOCKED): > net/route.c > netinet/if_ether.c > netinet6/nd6_nbr.c > netinet6/in6_ifattach.c > netinet6/in6_gif.c > > Question: is the above approach right and if it is, do anyone care to > make this replacement? > > BTW, how could I find out what causes these? If it's not a production server and/or you can afford downtime add kbd_backtrace() to rtfree (in src/sys/net/route.c) and you will see what cause the problem in your case.