From owner-freebsd-net Mon Nov 12 21:15:28 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 4CAE437B416 for ; Mon, 12 Nov 2001 21:15:25 -0800 (PST) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id VAA54532; Mon, 12 Nov 2001 21:01:59 -0800 (PST) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id fAD51xB56344; Mon, 12 Nov 2001 21:01:59 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200111130501.fAD51xB56344@arch20m.dellroad.org> Subject: Re: Mpd with a large number, 200+ , of bundles In-Reply-To: <3BF03C0F.9080704@ii.uib.no> "from Trond Davidsen at Nov 12, 2001 10:15:59 pm" To: Trond Davidsen Date: Mon, 12 Nov 2001 21:01:59 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Trond Davidsen writes: > just an update. I've been debugging a little more and found that mpd > hangs hard,top shows mpd's state as 'piperd', when it got over 128 > sockets open. This sounds like some kind of system limit to me, any > ideas anyone? > > I've enbled the '#define DEBUG_EVENT' in the file 'event.c' in the mpd > source, and got the following in the log: > > After mpd has set up all the (200) bundles: > > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: ACTIVE EVENTS: > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: -> 0x08079500 Read(13) > REF 150095121 @ 0x80794f0 > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: -> 0x08079780 Read(23) > REF 150095126 @ 0x8079770 > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: -> 0x08079980 Read(31) > REF 150095131 @ 0x8079970 Hmm... all prime number file descriptors... (just kidding :-) > [snip] > > > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: DOING ACTIONS: > Nov 12 21:57:26 vpn-gw3 mpd: [pptp190] EVENT: Doing action for Read(13) > REF 150095121 @ 0x80794f0 > > > After a little debugging with gdb, I found that these events are > registered at line 299 and 301 in the function NgFuncInit in the file > ngfunc.c. > > Does this give any clue as to where the fault or limit might be located? Those two events correspond to the netgraph data and control sockets associated with the bundle. Not sure how important that is.. the ng_socket(4) code relies on the standard generic socket code so unlikely that the problem lies there. The fact that it's blocked on "piperd" implies that something is going wrong with a message pipe (mpd uses pipe(2) to communicate with itself). But the tsleep() call in pipe_read() uses PCATCH, so 'kill' should work... What version of FreeBSD again? -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