php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42002 Loading extensions like ZendOptimizer, eAccelerator, APC coredumps
Submitted: 2007-07-15 19:28 UTC Modified: 2007-07-23 01:00 UTC
Votes:18
Avg. Score:3.1 ± 0.5
Reproduced:0 of 0 (0.0%)
From: klavs at austin dot ibm dot com Assigned:
Status: No Feedback Package: Dynamic loading
PHP Version: 4.4.7 OS: aix 5.3 TL06
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: klavs at austin dot ibm dot com
New email:
PHP Version: OS:

 

 [2007-07-15 19:28 UTC] klavs at austin dot ibm dot com
Description:
------------
This example is from loading xcache-1.2.1

Others like ZendOptimizer, eAccelerator, APC fail the same way. The only extension that does not seem to fail is the ZendExtensionManager.so

It fails the same way with 3.2.8, any clues as to what is wrong here.

Apache is compiled with the following options
CFLAGS="-O2 -bexpall"
./configure \
--prefix=/usr/local/apache2 \
--enable-so \
--with-mpm=prefork

PHP
CFLAGS="-O2 -bexpall" \
./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--enable-memory-limit \
--with-zlib \
--enable-tokenizer \
--disable-versioning

The library seems to be intact
# ldd /usr/local/Zend/lib/Optimizer-2_6_2/php-4.4.x/ZendOptimizer. so
/usr/local/Zend/lib/Optimizer-2_6_2/php-4.4.x/ZendOptimizer. so needs:
/usr/lib/libc.a(shr.o)
/usr/lib/librtl.a(shr.o)
/unix
/usr/lib/libcrypt.a(shr.o)

Top part of phpinfo() reads like this when the Zend Optimizer is removed from php.ini

phpinfo()
PHP Version => 4.4.6

System => AIX winter 3 5 000AC45CD600
Build Date => Jul 10 2007 17:29:26
Configure Command => './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' '--e
nable-memory-limit' '--with-zlib' '--enable-tokenizer' '--disable-versioning'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/Zend/etc/php.ini
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 20050606
Debug Build => no
Zend Memory Manager => enabled
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, compress.zlib


This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


Reproduce code:
---------------
# dbx ../php/bin/php
Type 'help' for help.
[using memory image in core]
reading symbolic information ...

Segmentation fault in xcache_zend_startup at line 2806 in file "/usr/local/xcache-1.2.1/xcache.c" ($t1)
 2806                   origin_compile_file = zend_compile_file;
(dbx) list 2800,2820
 2800   /* }}} */
 2801   ZEND_DLEXPORT int xcache_zend_startup(zend_extension *extension) /* {{{ */
 2802   {
 2803           xc_zend_extension_gotup = 1;
 2804
 2805           if (!origin_compile_file) {
 2806                   origin_compile_file = zend_compile_file;
 2807                   zend_compile_file = xc_check_initial_compile_file;
 2808           }
 2809
 2810           if (zend_llist_count(&zend_extensions) > 1) {
 2811                   zend_llist_position lpos;
 2812                   zend_extension *ext;
 2813
 2814                   xc_llist_zend_extension = xc_llist_get_element_by_zend_extension(&zend_extensions, XCACHE_NAME);
 2815                   xc_llist_unlink(&zend_extensions, xc_llist_zend_extension);
 2816
 2817                   ext = (zend_extension *) zend_llist_get_last_ex(&zend_extensions, &lpos);
 2818                   assert(ext && ext != xc_llist_zend_extension);
 2819                   xc_last_ext_startup = ext->startup;
 2820                   ext->startup = xc_zend_startup_last;
(dbx) where
xcache_zend_startup(extension = 0x2006e590), line 2806 in "xcache.c"
zend_extension_startup@AF25_2() at 0x10039bb8
zend_llist_apply_with_del() at 0x10023770
zend_startup_extensions() at 0x100396b4
php_module_startup() at 0x100043c8
php_cli.main() at 0x10000500
(dbx) quit


Expected result:
----------------
Loaded extension

Actual result:
--------------
Segmentation Fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-15 19:41 UTC] derick@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.

We don\'t support 3rd party extensions either.
 [2007-07-15 19:52 UTC] klavs at austin dot ibm dot com
I am filing this report since you seem to have a bug in your extension loader, I can run without the extension, though very poorly, but as soon as I try to load any extension php core dumps.
 [2007-07-15 21:56 UTC] pajoye@php.net
Does it happen only on AIX? Or can you reproduce it on other System?

I suppose you compile everything yourself (at least for xcache and apc)?
 [2007-07-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 09 10:01:27 2024 UTC