Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26602 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74678 invoked by uid 1010); 15 Nov 2006 09:11:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 74663 invoked from network); 15 Nov 2006 09:11:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2006 09:11:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:65171] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/00-07965-6D9DA554 for ; Wed, 15 Nov 2006 04:11:53 -0500 Received: (qmail 4148 invoked from network); 15 Nov 2006 09:03:41 -0000 Received: from internal.zend.office (HELO thinkpad) (10.1.1.1) by internal.zend.office with SMTP; 15 Nov 2006 09:03:41 -0000 To: , "Ilia Alshanetsky" , "Derick Rethans" , "Pierre-Alain Joye" Cc: "Andi Gutmans" Date: Wed, 15 Nov 2006 12:05:03 +0300 Message-ID: <000001c70895$242bd470$6e02a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Subject: Memeory leaks in ext/filter From: dmitry@zend.com ("Dmitry Stogov") Hi, I see a lot of memory leaks in ext filter when run php as FastCGI. The valgrind output follows. =3D=3D2482=3D=3D 554 bytes in 27 blocks are definitely lost in loss = record 37 of 56 =3D=3D2482=3D=3D at 0x4005400: malloc (vg_replace_malloc.c:149) =3D=3D2482=3D=3D by 0x82EE250: _emalloc (zend_alloc.c:1644) =3D=3D2482=3D=3D by 0x82EE6AB: _estrndup (zend_alloc.c:1767) =3D=3D2482=3D=3D by 0x80FCC05: php_sapi_filter (filter.c:389) =3D=3D2482=3D=3D by 0x8382B4C: cgi_php_import_environment_variables (cgi_main.c:509) =3D=3D2482=3D=3D by 0x82C87B0: php_auto_globals_create_env = (php_variables.c:788) =3D=3D2482=3D=3D by 0x82C7F83: php_hash_environment = (php_variables.c:673) =3D=3D2482=3D=3D by 0x82B8E76: php_request_startup (main.c:1126) =3D=3D2482=3D=3D by 0x83846CB: main (cgi_main.c:1634) The easyst way to reproduce/debug is run PHP as separate process (php -b ) and configure FastCGI module to use external server on the = socket. I am not sure that ext/filter is doing its work in right way. CGI and FastCGI register the same variables in ENV and SERVER arrays. But they really register varaible only once then duplicate array. Thanks. Dmitry.