Welcome! Log In Create A New Profile

Advanced

Core dump by syntax error php script

Posted by hshh 
hshh
Core dump by syntax error php script
July 09, 2010 04:42PM
I am running PHP 5.3.2 with FPM in freebsd x64 8.1. If there is syntax
error php, sometime php-fpm will not display error info, but segfault.

For example,
<?php
echo 1
echo 2
?>
Expected result is "Parse error: syntax error, unexpected T_ECHO,
expecting ',' or ';' in test.php on line 3".
But sometimes, "pid 9407 (php-fpm), uid 80: exited on signal 11" or
"pid 9408 (php-fpm), uid 80: exited on signal 10". It can repeat by
run a normal script, then run error script, and repeat.

After set up 777 permission to script directory, and ``sysctl
kern.sugid_coredump=1'', I can make php-fpm core dump.

With gdb, here is backtrace info.

#0 0x0000000000512dbe in _zend_mm_alloc_int ()
[New Thread 80171b1c0 (LWP 100175)]
[New LWP 100083]
(gdb) bt
#0 0x0000000000512dbe in _zend_mm_alloc_int ()
#1 0x0000000000501f08 in zend_multibyte_read_script ()
#2 0x00000000005022ff in open_file_for_scanning ()
#3 0x0000000000502a89 in compile_file ()
#4 0x000000000052efa6 in zend_execute_scripts ()
#5 0x00000000004dd4cc in php_execute_script ()
#6 0x00000000005ba186 in main ()
#7 0x00000000004166de in _start ()
#8 0x00000008007ab000 in ?? ()
#9 0x0000000000000000 in ?? ()
#10 0x0000000000000000 in ?? ()
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready