3

Posted this on stackoverflow but it seems more relevant over here... I'm doing some load testing (using jMeter) on a PHP app (it's a symfony app, if that matters). I've tested it under both apache/mod_php and nginx/php_fpm setups, and with multiple versions of php, apache, nginx, and linux and the logs are full of errors like these. I'm struggling to work out why these segfaults are occurring:

[Wed Mar 13 00:54:47 2013] [notice] child pid 18830 exit signal Bus error (7), possible coredump in /tmp/apache2-gdb-dump

[Wed Mar 13 00:54:55 2013] [notice] child pid 19016 exit signal Bus error (7), possible coredump in /tmp/apache2-gdb-dump

[Wed Mar 13 00:54:56 2013] [notice] child pid 19002 exit signal Bus error (7), possible coredump in /tmp/apache2-gdb-dump

[Wed Mar 13 00:54:58 2013] [notice] child pid 19041 exit signal Bus error (7), possible coredump in /tmp/apache2-gdb-dump

When I generate a backtrace from the core dumps I get

[New LWP 588] [Thread debugging using libthread_db enabled] Using host libthread_db library

"/lib/i386-linux-gnu/tls/i686/nosegneg/libthread_db.so.1". Core was generated by `/usr/sbin/apache2 -k start'. Program terminated with signal 7, Bus error.

0 lex_scan (zendlval=0xb6d2ce38) at /build/buildd/php5-5.4.6/Zend/zend_language_scanner.c:2260

Thread 1 (Thread 0xb7485700 (LWP 588)):

0 lex_scan (zendlval=0xb6d2ce38) at /build/buildd/php5-5.4.6/Zend/zend_language_scanner.c:2260

So perhaps it's something to do with parsing? I know little about php internals however, so am uncertain. What might be causing this?

djrobstep
  • 31
  • 3
  • Looks like a bug in PHP - have a look and see if you can see it in the bug list - if not log it: https://bugs.php.net/search.php?cmd=display&search_for=segfault&x=0&y=0 – symcbean Mar 13 '13 at 23:39
  • Thanks @symcbean it seems like it must be. I'll investigate further. – djrobstep Mar 14 '13 at 20:39

2 Answers2

0

This bugreport refers to the same issue: https://bugs.php.net/bug.php?id=52752

It seems concurrent file writes && reads cause it. The bug report also suggests it will not be fixed any time soon.

So I would suggest deep inspection of the code and to use different naming schemes for various channels accessing the same file.

helvete
  • 141
  • 5
-1

Just look into this link. It worked for me.

http://www.php.net/git.php#buildconf_fail