From:
Operating system: FreeBSD 8.1 i386
PHP version: 5.3.3
Package: Reproducible crash
Bug Type: Bug
Bug description:php cli & apache crash
Description:
------------
Hi PHP DEV team.
My system have a crash problem.
My PHP installed from FreeBSD ports system.
My apache always complain look like
[Thu Sep 30 11:47:21 2010] [notice] child pid 96860 exit signal Illegal
instruction (4)
[Thu Sep 30 11:48:52 2010] [notice] child pid 62054 exit signal
Segmentation fault (11)
And php cli also problem like
# php
Segmentation fault (core dumped)
But I cleared my extensions.ini empty, php cli work fine.
I can't identify extensions cause crash, Because random extensions cause
crash.
Under is my extensions.ini
extension=fileinfo.so
extension=imagick.so
extension=memcache.so
extension=apc.so
extension=zip.so
extension=mysqli.so
extension=simplexml.so
extension=mysql.so
extension=hash.so
extension=gettext.so
extension=ctype.so
extension=gd.so
extension=ftp.so
extension=bz2.so
extension=xml.so
extension=openssl.so
extension=mbstring.so
extension=mcrypt.so
extension=json.so
extension=imap.so
extension=ldap.so
extension=iconv.so
extension=filter.so
extension=readline.so
extension=session.so
extension=xmlrpc.so
extension=zlib.so
extension=dom.so
Today I tried set PHP debug complier flag, and use GDB for debug.
GDB debug output in Actual result.
Please help for debug
Thanks very much.
Expected result:
----------------
See 'NO SEG FAULT' printed to screen and work fine
Actual result:
--------------
# php
Segmentation fault (core dumped)
# gdb /usr/local/bin/php ./php.core
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.5...done.
Loaded symbols for /lib/libcrypt.so.5
Reading symbols from /lib/libz.so.5...done.
Loaded symbols for /lib/libz.so.5
Reading symbols from /usr/local/lib/libpcre.so.0...done.
Loaded symbols for /usr/local/lib/libpcre.so.0
Reading symbols from /lib/libm.so.5...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0 0x0806676e in guess_timezone (tzdb=0x83a7db8, tsrm_ls=0x28802040) at
/usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c:844
844 /usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c: No such
file or directory.
in /usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c
(gdb) bt
#0 0x0806676e in guess_timezone (tzdb=0x83a7db8, tsrm_ls=0x28802040) at
/usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c:844
#1 0x08066a43 in get_timezone_info (tsrm_ls=0x28802040) at
/usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c:939
#2 0x0806869f in php_format_date (format=0x83de55b "d-M-Y H:i:s",
format_len=11, ts=1286040963, localtime=1, tsrm_ls=0x28802040)
at /usr/ports/lang/php5/work/php-5.3.3/ext/date/php_date.c:1189
#3 0x081d63ce in php_log_err (
log_message=0x2882c4e0 "PHP Warning: PHP Startup: Unable to load
dynamic library '/usr/local/lib/php/20090626-zts-debug/fileinfo.so' -
Cannot open \"/usr/local/lib/php/20090626-zts-debug/fileinfo.so\" in
Unknown on line 0", tsrm_ls=0x28802040)
at /usr/ports/lang/php5/work/php-5.3.3/main/main.c:586
#4 0x081d76e8 in php_error_cb (type=32, error_filename=0x83f3cb7
"Unknown", error_lineno=0, format=0x83de558 "%s", args=0xbfbfe3e8
"\030�\202(")
at /usr/ports/lang/php5/work/php-5.3.3/main/main.c:1004
#5 0x08266175 in zend_error (type=32, format=0x83de558 "%s") at
/usr/ports/lang/php5/work/php-5.3.3/Zend/zend.c:1092
#6 0x081d6f73 in php_verror (docref=0x0, params=0x83dcac9 "", type=32,
format=0x83c5650 "Unable to load dynamic library '%s' - %s",
args=0xbfbfe4c0 "�\222\202(`\024C(\b忿\177�&\b",
tsrm_ls=0x28802040) at /usr/ports/lang/php5/work/php-5.3.3/main/main.c:808
#7 0x081d6feb in php_error_docref0 (docref=0x0, tsrm_ls=0x28802040,
type=32, format=0x83c5650 "Unable to load dynamic library '%s' - %s")
at /usr/ports/lang/php5/work/php-5.3.3/main/main.c:820
#8 0x0810f017 in php_load_extension (filename=0x28828118 "fileinfo.so",
type=1, start_now=0, tsrm_ls=0x28802040)
at /usr/ports/lang/php5/work/php-5.3.3/ext/standard/dl.c:158
#9 0x081e21fa in php_load_php_extension_cb (arg=0x28802ef8,
tsrm_ls=0x28802040) at
/usr/ports/lang/php5/work/php-5.3.3/main/php_ini.c:350
#10 0x08258f15 in zend_llist_apply (l=0x8417a5c, func=0x81e21d0
<php_load_php_extension_cb>, tsrm_ls=0x28802040)
at /usr/ports/lang/php5/work/php-5.3.3/Zend/zend_llist.c:385
#11 0x081e30ec in php_ini_register_extensions (tsrm_ls=0x28802040) at
/usr/ports/lang/php5/work/php-5.3.3/main/php_ini.c:724
#12 0x081daa2b in php_module_startup (sf=0x8404de0, additional_modules=0x0,
num_additional_modules=0)
at /usr/ports/lang/php5/work/php-5.3.3/main/main.c:2036
#13 0x08350d51 in php_cli_startup (sapi_module=0x8404de0) at
/usr/ports/lang/php5/work/php-5.3.3/sapi/cli/php_cli.c:401
#14 0x08351b2c in main (argc=1, argv=0xbfbfe850) at
/usr/ports/lang/php5/work/php-5.3.3/sapi/cli/php_cli.c:775
--
Edit bug report at http://bugs.php.net/bug.php?id=52977&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52977&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52977&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52977&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52977&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52977&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52977&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52977&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52977&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52977&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52977&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52977&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52977&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52977&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52977&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52977&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52977&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52977&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52977&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52977&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52977&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52977&r=mysqlcfg