php 5.5.3 segfault

Hello,

I'm getting a systematic php segmentation fault when accessing my zenphoto album (fresh install). Interestingly enough, if the albums/ folder is empty, no segfault, as soon as I create even an empty album, segfaults. Accessing any page that does not relates to albums (e.g. config pages) always works fine.

OS : Ubuntu Saucy
php version : 5.5.3
apache version : 2.4.6

The same code/config combo runs fine with php 5.3.10 on another server.

I got the following from running gdb on the core dump, but am frankly at loss as to what to do next to debug / troubleshoot. Any help welcome :-)

(gdb) bt
#0 zval_delref_p (pz=<optimized out>) at /build/buildd/php5-5.5.3+dfsg/Zend/zend.h:409
#1 zend_pzval_unlock_func (unref=1, should_free=<synthetic pointer>, z=0x0) at /build/buildd/php5-5.5.3+dfsg/Zend/zend_execute.c:72
#2 _get_zval_ptr_ptr_var (should_free=<synthetic pointer>, execute_data=0x7fddc2d28b28, var=<optimized out>) at /build/buildd/php5-5.5.3+dfsg/Zend/zend_execute.c:384
#3 ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER (execute_data=0x7fddc2d28b28) at /build/buildd/php5-5.5.3+dfsg/Zend/zend_vm_execute.h:14783
#4 0x00007fddbb473928 in execute_ex (execute_data=0x7fddc2d28b28) at /build/buildd/php5-5.5.3+dfsg/Zend/zend_vm_execute.h:356
#5 0x00007fddbb44b760 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3) at /build/buildd/php5-5.5.3+dfsg/Zend/zend.c:1316
#6 0x00007fddbb3eba95 in php_execute_script (primary_file=primary_file@entry=0x7fff77a9be20) at /build/buildd/php5-5.5.3+dfsg/main/main.c:2484
#7 0x00007fddbb4fb8ca in php_handler (r=<optimized out>) at /build/buildd/php5-5.5.3+dfsg/sapi/apache2handler/sapi_apache2.c:667
#8 0x00007fddc2f1f320 in ap_run_handler ()
#9 0x00007fddc2f1f6f9 in ap_invoke_handler ()
#10 0x00007fddc2f3458a in ap_process_async_request ()
#11 0x00007fddc2f34874 in ap_process_request ()
#12 0x00007fddc2f31302 in ?? ()
#13 0x00007fddc2f28210 in ap_run_process_connection ()
#14 0x00007fddbbe1a767 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#15 0x00007fddbbe1a9a6 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#16 0x00007fddbbe1aa06 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#17 0x00007fddbbe1b6f0 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#18 0x00007fddc2f064ae in ap_run_mpm ()
#19 0x00007fddc2effc66 in main ()

Comments

  • Best guess then is that there is a problem with image re-sizing. a segmentation fault is the result of the application (PHP) trying to do an address fetch beyond its legitimate data.

    That could be a flawed PHP build, probably in the graphics library or it could be corrupted images (and the graphics library not gracefully handling them--something that is unfortunately too common for the GD library.)
  • Thanks for the help.

    I think some of the tests I did ruled out the image maniuplation issue:

    - Creating a single album with a couple of images triggers the segfault
    - Even creating an empty directory in albums/ triggers the segfault
    - Switching to Imagemagick leads to the exact same segfault

    Another idea? :-)
  • I have no idea if this is it, but

    https://bugs.php.net/bug.php?id=61165

    If so, then the only solution is to upgrade the PHP version.
  • Indeed whatever is causing the segfault is fixed by upgrading to php 5.5.4.

    Thanks a lot for Zenphoto and for your help!
Sign In or Register to comment.