Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP5 segfaults when run via cron, not via cli
    text
    copied!<p>This is definitely a strange one.</p> <p>I have a group of PHP scripts that process images (resizing, annotating) with imagick. When run directly via cli, they run fine. Memory usage according to htop peaks at around 115MB. </p> <p>However, when run via cron, they consistently fail within 1-20 seconds with a segfault like this:</p> <pre><code>Dec 15 17:01:40 recurring kernel: php5[4804]: segfault at b68e6775 ip b68e6775 sp b3ad32e8 error 14 Dec 15 17:01:40 recurring kernel: php5[4803]: segfault at b68e6778 ip b68e6778 sp b42d42e8 error 14 Dec 15 17:01:40 recurring kernel: php5[4802]: segfault at b68e6772 ip b68e6772 sp b648c2e8 error 14 </code></pre> <p>I've tried running the scripts via cli and watched as the same script spawned and then segfaulted by cron. Same memory usage. There is absolutely nothing in the php logs. Installing xdebug didn't result in any errors. free -m consistently reports over 50% of ram free.</p> <p>These are linode instances on Ubuntu Lucid. I've tried cloning to a new linode, as well as building from scratch. Same issue.</p> <p>php -v:</p> <pre><code>PHP 5.3.5-1ubuntu7.2ppa1~lucid with Suhosin-Patch (cli) (built: May 7 2011 03:12:27) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies </code></pre> <p>php -m:</p> <pre><code>[PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gettext hash iconv imagick json libxml mbstring mhash mysql openssl pcntl pcre Phar posix readline Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib [Zend Modules] </code></pre> <p>The codebase is far to large and complex to represent here, and it's not confined to one script. I was hoping for more general suggestions on what might cause this unique situation where I can run the scripts fine on the commandline but when run via cron they fail.</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload