From owner-freebsd-net@FreeBSD.ORG Tue Nov 23 10:02:41 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F08B916A4CE for ; Tue, 23 Nov 2004 10:02:41 +0000 (GMT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87B8243D58 for ; Tue, 23 Nov 2004 10:02:41 +0000 (GMT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.13.1/8.13.1) with ESMTP id iANA0uq0083538 for ; Tue, 23 Nov 2004 05:00:56 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)iANA0ukQ083535 for ; Tue, 23 Nov 2004 10:00:56 GMT (envelope-from robert@fledge.watson.org) Date: Tue, 23 Nov 2004 10:00:55 +0000 (GMT) From: Robert Watson X-Sender: robert@fledge.watson.org To: net@FreeBSD.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Running into an mbuf leak with bridging and tap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 10:02:42 -0000 I'm running an ethernet over TCP bridge using a combination of the native ethernet bridge support and the tap driver. Basically, a daemon sits on /dev/tapX and bridges ethernet frames using a small header over a TCP connection. The bridge support is loaded as a kld, as is the tap support, and both modules remain resident from then on. After a couple of days, perhaps triggered by the connection going up and down and leaving bridging turned on even when nothing is listening on the tap device, the endpoints will run out of mbufs: 26707 mbufs in use 25453/25600 mbuf clusters in use (current/max) 0/3/6656 sfbufs in use (current/peak/max) 57582 KBytes allocated to network 0 requests for sfbufs denied 0 requests for sfbufs delayed 0 requests for I/O initiated by sendfile 0 calls to protocol drain routines Under normal circumstances (i.e., without tap and ethernet bridging on), this doesn't happen, suggesting that maybe there's a leak in the bridging code or tap code. I've now seen this with three boxes, a blend of UP and SMP. I haven't yet had a chance to sit down with a debugging kernel. Has anyone else seen anything like this? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Principal Research Scientist, McAfee Research