Re: Segmentation fault in php5-imap



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@xxxxxxxxxxxxxxx> 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


.



Relevant Pages

  • mysqli error?
    ... I'm just setting up my php enviroment and I typed in a simple script ... # configuration directives that give the server its instructions. ...
    (comp.lang.php)
  • Re: How do we get there from here?
    ... >> executing on the server as a pre-processor. ... If there are client side versions of PHP, ... > name implies a static text file, is it different from a PHP script? ...
    (comp.databases.pick)
  • Re: Apache: limiting the execution place
    ... They want it so users can't use FTP, shell, or a CGI or PHP script to view, ... other users via shell, FTP, web server processes (such as PHP or CGI ...
    (Security-Basics)
  • Re: PHP chmod Newbie Question
    ... How does the server keep ... how do I create user groups for chmod to recognize? ... CHMOD is for UNIX based servers, and the PHP chmod() ... edited or removed by the PHP script, and only read by the UNIX ...
    (comp.lang.php)
  • Re: PHP in html
    ... additional calls to the server, ... to invoke a script handler for every single image. ... configuration of the webserver and the PHP interpreter. ... If you think interpreting all pages as PHP ...
    (comp.lang.php)