From owner-freebsd-net Sat Mar 31 23: 2:31 2001 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id 94F7C37B718 for ; Sat, 31 Mar 2001 23:02:26 -0800 (PST) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id JAA38638; Sun, 1 Apr 2001 09:01:45 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200104010701.JAA38638@info.iet.unipi.it> Subject: Re: mbuf leak? fxp? In-Reply-To: <200103312350.f2VNon305299@bubba.packetdesign.com> from Archie Cobbs at "Mar 31, 2001 03:50:49 pm" To: Archie Cobbs Date: Sun, 1 Apr 2001 09:01:45 +0200 (CEST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [Cc list trimmed to -net] > I have this machine that starts running out of mbufs every few days > ("looutput: mbuf allocation failed") and then crashes, and was wondering > if anyone else has seen similar behavior... i do not think it is in the fxp driver -- i'd rather suspect divert, or maybe the multicast part (where replication occurs, so it is not unlikely that the code might forget to free some mbuf upon some error condition). It also looks like you have as many mbufs as clusters, maybe an indication that on those buffers someone has done an m_pullup ? A quick test would be to disconnect the network for a few seconds and see if the mbuf usage drains to a low level. Another one would be to see if there are buffers queued on some socket (but i do not know how to see it, i seem to remember some new netstat flag). cheers luigi > For example... > > Yesterday... > $ netstat -m > 461/624/4096 mbufs in use (current/peak/max): > 459 mbufs allocated to data > 2 mbufs allocated to packet headers > 434/490/1024 mbuf clusters in use (current/peak/max) > 1136 Kbytes allocated to network (36% of mb_map in use) > 0 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > Today... > $ netstat -m > 947/1072/4096 mbufs in use (current/peak/max): > 945 mbufs allocated to data > 2 mbufs allocated to packet headers > 920/946/1024 mbuf clusters in use (current/peak/max) > 2160 Kbytes allocated to network (70% of mb_map in use) > 0 requests for memory denied > 0 requests for memory delayed > 0 calls to protocol drain routines > > It appears that something is slowly eating up mbuf clusters. > The machine is on a network with continuous but very low volume > traffic, including some random multicast, NTP, etc. The machine > itself is doing hardly anything at all. > > (Possibly) relevant information: > > - FreeBSD 4.2-RELEASE > - Ethernet driver is fxp(4) > - Using ipfw(4) and divert(4) > - mysql is running, which uses a UNIX domain socket > > (Possibly) relevant clue: > > - We have other machines configured almost identically but which > are not using the fxp(4) driver (and which are handling lots more > traffic) that don't show this problem. > > Any ideas?? I wonder if there's some obscure error condition in the > fxp(4) driver that has a memory leak. > > -Archie > > __________________________________________________________________________ > Archie Cobbs * Packet Design * http://www.packetdesign.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message