php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44104 php-5.2.5 and 5.2-dev crashes with zend on freebsd
Submitted: 2008-02-12 10:53 UTC Modified: 2008-02-12 17:01 UTC
From: fly-away at user dot i dot zabor dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2CVS-2008-02-12 (snap) OS: Freebsd 6.1-7.0
Private report: No CVE-ID: None
 [2008-02-12 10:53 UTC] fly-away at user dot i dot zabor dot com
Description:
------------
Try it on Freebsd 6.1, 6.2 i386, Freebsd-7.0-amd64
From ports with freebsd related patches and without. 
I try php-5.2.5 and php5.2-dev snap 11Feb2008.
ZendOptimizer-3.3.0a-freebsd6.0-i386 (amd64).
php-cgi crashes and write core
Program terminated with signal 11, Segmentation fault.


Reproduce code:
---------------
$ ./configure --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --enable-libxml --with-libxml-dir=/usr/local --enable-reflectio
n --program-prefix= --enable-fastcgi --with-regex=php --with-zend-vm=CALL --enable-zend-multibyte --disable-ipv6 --prefix=/usr/local --mandir=/
usr/local/man --infodir=/usr/local/info/ i386-portbld-freebsd6.2

$ cat php.ini
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer="/usr/local/lib/php/20060613/Optimizer"
zend_extension_manager.optimizer_ts="/usr/local/lib/php/20060613/Optimizer_TS"
zend_extension="/usr/local/lib/php/20060613/ZendExtensionManager.so"
zend_extension_ts="/usr/local/lib/php/20060613/ZendExtensionManager_TS.so"

$ php-cgi -m

Actual result:
--------------
# work/php5.2-200802111130/sapi/cgi/php-cgi -m
[PHP Modules]
cgi-fcgi
date
libxml
Reflection
standard
Zend Optimizer

[Zend Modules]
Zend Extension Manager
Zend Optimizer

Segmentation fault (core dumped)

At now php5.2.5+zend can't work on all my freebsd servers.

# gdb work/php5.2-200802111130/sapi/cgi/php-cgi php-cgi.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `php-cgi'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.3
Reading symbols from /lib/libm.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.4
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /lib/libz.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.3
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x08163247 in module_destructor ()
(gdb) bt
#0  0x08163247 in module_destructor ()
#1  0x08169614 in zend_hash_apply_deleter ()
#2  0x081696a3 in zend_hash_graceful_reverse_destroy ()
#3  0x0815e0d2 in zend_shutdown ()
#4  0x08115e34 in php_module_shutdown ()
#5  0x081eb486 in main ()

I cant run php compiled with debug with zendoptimizer for more informational backtrace.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-12 17:01 UTC] iliaa@php.net
Do not file bugs when you have Zend extensions (zend_extension=)
loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache,
APC, Xdebug and ionCube loader.  These extensions often modify engine
behavior which is not related to PHP itself.

Please disable the 2 zend extensions you have loaded and see if you can 
reproduce the crash.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 05:01:30 2024 UTC