Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51789 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97405 invoked from network); 1 Apr 2011 13:20:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2011 13:20:36 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:61694] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/AD-28342-221D59D4 for ; Fri, 01 Apr 2011 08:20:35 -0500 Received: by fxm1 with SMTP id 1so2808159fxm.29 for ; Fri, 01 Apr 2011 06:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=tlpQ6l3x2jtXUGXz1QFE2f1ukQ18fVIPtpDkkxc0z14=; b=fCmFwH4MBqmIuqd3xIkUiQsAHekStp8yEL4of7RbDvcljvdX4ERHVv9SogbCJOJ+51 DJe6Vxx6UT6SqCZvoD18l2mBoPc69fvwUNB6ZgMRfAPQeZsi+tGk1GV3YmVJvRAoufJ8 Ce+BAkj2wsRxl2GZPpsN3Wo1yzsH4UBDny+Zs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=N8h0+049r+yWYtZEmiBlb7b2DJ+FaCGF4IFTohKczAZMGIFtxgdqKa5ZlXYclt6m2X m1wVTOVanYQ/yV6R1G1/YVdzqPdX1D1S/NMLg28gKLnr6Oef8CcOA36a7FeZgVoEd9aY Zv/qq/e/Xx5A+PeZMZiD2otBcVk/6rja8kCt8= MIME-Version: 1.0 Received: by 10.223.3.132 with SMTP id 4mr1428687fan.132.1301664031799; Fri, 01 Apr 2011 06:20:31 -0700 (PDT) Received: by 10.223.74.203 with HTTP; Fri, 1 Apr 2011 06:20:31 -0700 (PDT) In-Reply-To: <4D95B6AB.30608@templeet.org> References: <4D95B6AB.30608@templeet.org> Date: Fri, 1 Apr 2011 15:20:31 +0200 Message-ID: To: Pascal COURTOIS Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] how to find a memory corruption in php ? From: pierre.php@gmail.com (Pierre Joye) hi, In php 5.3+ the memory limit default is 256MB, not 128MB. 5.3 does not necessary use more memory but actually uses and reports its usage more efficiently. I would suggest to use this default value and try again. About detecting leaks and memory corruptions, valgrind is a good tool to begin with. Cheers, On Fri, Apr 1, 2011 at 1:27 PM, Pascal COURTOIS wrote: > Hi all, > > I get an error with my program: > Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/courtois/php-5.3.6/Zend/zend_execute.h:163 (tried to allocate 261900 bytes) in /var/www/dev4.sociatomdev.com/chroot/htdocs/templeet/fetch.php on line 580 > > > - The same error occurs with any of php 5.3 versions tested. With 5.2 it's ok. > - I know the error message is wrong. The program does not consume much memory. > - If i change some lines in my php code like adding trace messages it sometimes work sometimes no (but constant result for same php code) > > > I will not submit the bug since it's hard to reproduce unless being in the exact same configuration as me. > > I used to be an experienced C programmer (>300000 lines written) but almost nothing for the last 15 years. > > My questions: > - is there any document somewhere to read before hunting a bug in php ? > - are there any build/compile options other than --enable-debug ? > - how should I proceed to debug when php is called via fastcgi ? > > My configuration: debian squeeze i386 32bits > > Thanks, > > Pascal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org