Re: Segmentation fault in php5-imap

From: Date: Wed, 24 Dec 2008 00:30:55 +0000
Subject: Re: Segmentation fault in php5-imap
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-285026@lists.php.net to get a copy of this message
Script takes about 5 minutes to run (average). On other servers I've seen it run over 2 hours without segfaults... All depends on how many messages are in the NNTP mailboxes. After applying the mentioned patch to libc-client2002edebian the issue persisted. No change... I'm not running xdebug. The PHP memory limit is 512 Mb and server has 16Gb of RAM, so it doesn't look like its exhausting all the memory, although one of the libraries potentially could? If this helps: It looks like the script is dropping connection to the NNTP server. If it then tries to open another mailbox, it segfaults. Otherwise it continues to run successfully. But why does it drop the connection? Thanks a lot for your help!! Dan Nathan Nobbe wrote:
On Tue, Dec 23, 2008 at 1:42 PM, Dan Osipov <dosipov@phillyburbs.com> wrote:
Everything matches. The only thing that's different is that the server that's having the problem has been running the script every 15 mins for the past 2 months - which leads me to believe there might be a memory leak somewhere...
if the script isnt long running, *theorectically* speaking once php shuts down, all php allocated memory should get freed up, unless theres a bigger mem leak issue w/ php itself. Although complete recompiling should reset something, right? well if you were running an older version of php, and you upgraded to 5.2.8, then theres a chance a mem leak bug could be fixed by it. but only if they actually patched that problem. id be surprised to see a memory leak persist after a php script has run to completion. I found this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502996 But the patch didn't work. The library is required by php5-imap (which is a standalone package).
hmm, so the extension wouldnt compile w/ the patch, or after building w/ the patch the problem persists? are you by chance running anything like xdebug on the server. that (and similar extensions) keep a lot of things in memory during script execution that php normally cleans up. once i had a cli script which would eat up all of the memory on the box. even unset() calls wouldnt stop the madness. then i realized i had xdebug running, disabled it, and bam, all was good again. also, do you have any idea, the duration of the script execution. -nathan


« previous php.general (#285026) next »