From owner-freebsd-ports@FreeBSD.ORG Thu Jan 15 15:31:38 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC3F616A4CE for ; Thu, 15 Jan 2004 15:31:38 -0800 (PST) Received: from swan.mail.pas.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by mx1.FreeBSD.org (Postfix) with ESMTP id C986043D66 for ; Thu, 15 Jan 2004 15:31:36 -0800 (PST) (envelope-from mvh@ix.netcom.com) Received: from lsanca1-ar6-4-62-201-084.lsanca1.elnk.dsl.genuity.net ([4.62.201.84] helo=netcom1.netcom.com) by swan.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1AhGxc-0001O0-00 for ports@freebsd.org; Thu, 15 Jan 2004 15:31:36 -0800 Received: from localhost (localhost [127.0.0.1]) by netcom1.netcom.com (Postfix) with ESMTP id A324B5596 for ; Thu, 15 Jan 2004 15:31:35 -0800 (PST) Received: from netcom1.netcom.com ([127.0.0.1]) by localhost (netcom1.netcom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53850-08 for ; Thu, 15 Jan 2004 15:31:28 -0800 (PST) Received: by netcom1.netcom.com (Postfix, from userid 1000) id BE39954E5; Thu, 15 Jan 2004 15:31:28 -0800 (PST) From: Mike Harding To: ports@freebsd.org Message-Id: <20040115233128.BE39954E5@netcom1.netcom.com> Date: Thu, 15 Jan 2004 15:31:28 -0800 (PST) X-Virus-Scanned: by amavisd-new at ix.netcom.com Subject: perl 5.8 and malloc (and mod_perl) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2004 23:31:39 -0000 (This is a copy of a mail already sent to the perl5.8 port maintainer, I wanted to make sure that this info is available to those who run into the same issue) I have a few client sites where recently (since a perl upgrade) Mason/mod_perl based httpd processes had 'swollen' to huge sizes - 300+ meg. After a lot of coffee and googling and such, it looks like the culprit is somehow related to the use of perl's malloc. When apache gets a graceful restart signal (for rotating logs) the root apache process (and all it's children) grow by 6 megs or so. I'm rotating the logs every day at midnight so it took a while for me to notice. The situation looks similar to: http://perl.apache.org/docs/1.0/guide/install.html#When_DSO_can_be_Used (although not exactly the same) and I found by rebuilding perl with the system malloc as follows # make -DWITHOUT_PERL_MALLOC and rebuilding mod_perl (not sure if I needed to do that) the leak stops, or at least slows down so much that I don't care. You might want to consider moving the malloc switch the other way, or at least putting a big fat warning on the perl build so that others don't have to jump through the same hoops that I did... Thanks for working on the port... - Mike H.