Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

php5-fpm crashed on certain pages

71 views
Skip to first unread message

moc...@gmail.com

unread,
Mar 31, 2015, 3:20:32 AM3/31/15
to
Hi,

I recently update php5(including php5-fpm, php5-common, php5-curl, php5-readline, php5, php5-cgi, php5-cli, php5-mysqlnd, php-pear, php5-gd, php5-dev) from 5.5.9+dfsg-1ubuntu4.3 to 5.5.9+dfsg-1ubuntu4.7.

When I visit my phabricator pages like 'http://myhost/diffusion/import/' and 'http://myhost/rMOEDEVa711f8d906a339d18dc0463ef7f1f4745d1f0ebf', nginx returns '502 Bad Gateway' while some pages/my other php websites are still '200 OK'. Also there's no error in mysql schema/data.

The php log prints out 'WARNING: [pool www] child exited on signal 11 (SIGSEGV - core dumped) after ... seconds from start' once I visit those pages.

The nginx error log prints out 'recv() failed (104: Connection reset by peer) while reading response header from upstream'.

The whole core dump info here:

```
Reading symbols from /usr/sbin/php5-fpm...Reading symbols from /usr/lib/debug//usr/sbin/php5-fpm...done.
done.
[New LWP 16225]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

Core was generated by `php-fpm: pool www '.
Program terminated with signal SIGSEGV, Segmentation fault.

#0 0x000000000035c29f in ?? ()
#1 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96fa0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#2 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#3 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d96e80)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#4 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96e80) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#5 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#6 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d96d10)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#7 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96d10) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#8 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#9 0x00000000006df791 in zend_call_function (fci=fci@entry=0x7fff172ed310, fci_cache=<optimized out>, fci_cache@entry=0x0)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:939
#10 0x00000000006df98e in call_user_function_ex (function_table=<optimized out>, object_pp=object_pp@entry=0x0,
function_name=function_name@entry=0x3502f28, retval_ptr_ptr=retval_ptr_ptr@entry=0x7fff172ed468, param_count=param_count@entry=1,
params=params@entry=0x7fff172ed450, no_separation=no_separation@entry=0, symbol_table=symbol_table@entry=0x0)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:727
#11 0x00000000004ab1f3 in preg_do_repl_func (result=<synthetic pointer>, count=2, subpat_names=0x357eb78, offsets=0x357bcd8,
subject=0x3591250 "fix #32000 @3h - front page multi language", function=0x3502f28)
at /build/buildd/php5-5.5.9+dfsg/ext/pcre/php_pcre.c:876
#12 php_pcre_replace_impl (pce=0x35a8bb0, subject=0x3591250 "fix #32000 @3h - front page multi language", subject_len=42,
replace_val=replace_val@entry=0x3502f28, is_callable_replace=is_callable_replace@entry=1,
result_len=result_len@entry=0x7fff172ed600, limit=-1, replace_count=0x7fff172ed604)
at /build/buildd/php5-5.5.9+dfsg/ext/pcre/php_pcre.c:1121
#13 0x00000000004ab797 in php_pcre_replace (regex=<optimized out>, regex_len=<optimized out>, subject=<optimized out>,
subject_len=<optimized out>, replace_val=replace_val@entry=0x3502f28, is_callable_replace=is_callable_replace@entry=1,
result_len=0x7fffffffffff, result_len@entry=0x7fff172ed600, limit=388945412, limit@entry=-1,
replace_count=replace_count@entry=0x7fff172ed604) at /build/buildd/php5-5.5.9+dfsg/ext/pcre/php_pcre.c:997
#14 0x00000000004ab8b9 in php_replace_in_subject (regex=0x3567738, replace=0x3502f28, subject=0x7f9bb5d96cb0,
result_len=result_len@entry=0x7fff172ed600, limit=limit@entry=-1, is_callable_replace=is_callable_replace@entry=1,
replace_count=replace_count@entry=0x7fff172ed604) at /build/buildd/php5-5.5.9+dfsg/ext/pcre/php_pcre.c:1318
#15 0x00000000004abeb8 in preg_replace_impl (ht=3, return_value=0x3571a58, is_callable_replace=1, is_filter=0,
return_value_used=<optimized out>, this_ptr=<optimized out>, return_value_ptr=<optimized out>)
at /build/buildd/php5-5.5.9+dfsg/ext/pcre/php_pcre.c:1416
#16 0x00000000006dd55b in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>,
return_value_used=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:97
#17 0x000000000079d5b5 in zend_do_fcall_common_helper_SPEC (execute_data=<optimized out>)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:552
#18 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96be0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363

#19 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#20 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d96ad0)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#21 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96ad0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#22 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#23 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d969b0)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#24 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d969b0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#25 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#26 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d967d0)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#27 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d967d0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#28 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#29 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d96650)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#30 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96650) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#31 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#32 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d96140)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#33 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d96140) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#34 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#35 0x000000000079dc00 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f9bb5d95f70)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#36 0x00000000007172e8 in execute_ex (execute_data=0x7f9bb5d95f70) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#37 0x00000000006dd459 in dtrace_execute_ex (execute_data=<optimized out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#38 0x00000000006eeee0 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3)
at /build/buildd/php5-5.5.9+dfsg/Zend/zend.c:1316
#39 0x000000000068edc5 in php_execute_script (primary_file=primary_file@entry=0x7fff172f0550)
at /build/buildd/php5-5.5.9+dfsg/main/main.c:2506
#40 0x0000000000463b00 in main (argc=<optimized out>, argv=<optimized out>)
at /build/buildd/php5-5.5.9+dfsg/sapi/fpm/fpm/fpm_main.c:1933

```

Why does php crash? Thank you in advance.

Jerry Stuckle

unread,
Mar 31, 2015, 11:49:30 AM3/31/15
to
On 3/31/2015 3:20 AM, moc...@gmail.com wrote:
> Hi,
>
> I recently update php5(including php5-fpm, php5-common, php5-curl, php5-readline, php5, php5-cgi, php5-cli, php5-mysqlnd, php-pear, php5-gd, php5-dev) from 5.5.9+dfsg-1ubuntu4.3 to 5.5.9+dfsg-1ubuntu4.7.
>
> When I visit my phabricator pages like 'http://myhost/diffusion/import/' and 'http://myhost/rMOEDEVa711f8d906a339d18dc0463ef7f1f4745d1f0ebf', nginx returns '502 Bad Gateway' while some pages/my other php websites are still '200 OK'. Also there's no error in mysql schema/data.
>
> The php log prints out 'WARNING: [pool www] child exited on signal 11 (SIGSEGV - core dumped) after ... seconds from start' once I visit those pages.
>
> The nginx error log prints out 'recv() failed (104: Connection reset by peer) while reading response header from upstream'.
>
> The whole core dump info here:
>
<snip>

If I'm reading this correctly (and I'll be the first to admit maybe I'm
not - I'm not an expert at core dumps), it looks like the failure is
while processing a preg_replace() function call.

Do you have any really complicated preg_replace calls, especially
recursive (which could overrun the stack)?

A *very* quick check at bugs.php.net didn't show any known problems
here. But then again, there has to be someone to report a bug the first
time! :)



--
==================
Remove the "x" from my email address
Jerry Stuckle
jstu...@attglobal.net
==================

moc...@gmail.com

unread,
Apr 1, 2015, 12:47:55 AM4/1/15
to
Hi,

Thanks for your reply. I've solved this problem.

The links '/etc/php5/fpm/conf.d/20-mysql.ini' and '/etc/php5/fpm/conf.d/20-mysqli.ini' are missing.
0 new messages