apache2 - Can actual PHP code be causing a segmentation fault in Apache, and if so how? -
i have apache 2.2.14 installed php version 5.3.2 , libapache2-mod-php5 version 5.3.2-1ubuntu4.7 on ubuntu 10.04 x64. getting segmentation faults rather in apache2 error logs. after getting apache dump crash log , running through gdb seems culprit php module. it's crashing on specific bit of code. here output gdb:
core generated `/usr/sbin/apache2 -k start'. program terminated signal 11, segmentation fault. 0 0x00007ff2b3acaec3 in _zend_mm_free_canary_int (heap=0x7ff2b9035b10, p=0x6d48358fae6de187) @ /build/buildd/php5-5.3.2/zend/zend_alloc_canary.c:2090 2090 /build/buildd/php5-5.3.2/zend/zend_alloc_canary.c: no such file or directory. in /build/buildd/php5-5.3.2/zend/zend_alloc_canary.c
a @ frame 0, innermost frame, yields this:
(gdb) dump_bt executor_globals.current_execute_data [0xb79f0c10] get() /var/www/somedirectory/settingsfile.inc:18 [0xb79f09f0] get() /var/www/somedirectory/securityfile.inc:10 [0xb79ef068] __construct() /var/www/somedirectory/phpfile.php:3
this code running on server libapache2-mod-php5 , php version 5.2.6 , apache 2.2.9. moved server running newer versions of , started getting these segfaults along reports users intermittently getting blank pages when attempt access site. appear 2 related , segfaults being caused code, i've no idea how begin track down might wrong, nor if it's in fact possible php code cause this. don't know php, , therefore didn't write code. questions are:
- could code causing segmentation faults in apache? interpreting output properly?
- how 1 debug php code? tried use firebug , companion plugins, required more web programming experience have.
could modules loaded php cause issues how php module functions? understand mod_php5 installed that's how apache processes php requests/scripts, actual php5 install have bearing on how that's done? mean have following installed:
libapache2-mod-php5 5.3.2-1ubuntu4.7
php5 5.3.2-1ubuntu4.7
php5-cli 5.3.2-1ubuntu4.7
php5-common 5.3.2-1ubuntu4.7
php5-curl 5.3.2-1ubuntu4.7
php5-mysql 5.3.2-1ubuntu4.7
i'm not sure how work together, if @ all, if uninstall php5 , leave libapache2-mod-php5 if make difference.
thanks in advance advice can give me on tracking down. if need actual lines php scripts can provide them well.
over years i've seen php cause apache crashes on numerous occasions, 2 causes :
- one of many bugs in php parser & interpreter (especially &references)
- stack overflows caused recursion in php programs
bugs seem fixed time php still php...
Comments
Post a Comment