From: phpbugs at majiclab dot com
Operating system: SuSE 9.1
PHP version: 5CVS-2004-12-17 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: segfault when using phpMyAdmin
Description:
------------
I decided to start a new bug, but I already posted this same comment in
bug #30653. Sorry if this causes confusion, but I thought it might be
better to start a new bug after I realized that so many things had changed
(different OS, different PHP version (4 vs. 5), etc.) As well, I forgot my
configure line (found at very bottom of post)...
I have some websites that run fine, with DB connection through mysqli.
However, browsing to the phpMyAdmin page causes a segfault. I am using
phpMyAdmin-2.6.0-pl3. Previously, before it would segfault, phpMyAdmin
would not even let me login, returning me this error: "SELECT VERSION()
as version", empty result set returned (or something like that). So I
have never had phpMyAdmin working at all, but it never segfaulted
before.
I am really confused, and hopefully a somewhat serious bug can be found
of this, as I have been having several random segfault parties (times
where certain code segfaults for no apparent reason).
A little more info:
I am running a AMD 64 3200+, 512MB RAM, SuSE 9.1 (kernel-2.6.4,
glibc-2.3.3)
Thanks for any help/fixes!
-Andrew
'./configure' '--prefix=/usr/local/php5'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-libxml-dir=/usr/local/lib' '--with-zlib'
'--with-zlib-dir=/usr/local/lib'
'--with-mysqli=/usr/local/mysql/bin/mysql_config' '--enable-sockets'
'--enable-exif'
Reproduce code:
---------------
Not sure. If anybody wants me to debug phpMyAdmin to try to make this
process easier, then I can try that... but I'm hoping the backtrace might
be enough. This information might be valuable:
phpMyAdmin acutally works enough to ask me for my username/password. If I
enter the wrong username/password, it works fine, as in it keeps asking me
for u/p. However, once I enter the *correct* u/p, it then segfaults. I
will provide some pseudo code of the PMA_DBI_postConnect() function called
after a succesful connect:
<?php
if (!defined('PMA_MYSQL_INT_VERSION')) {
// this is where it used to not work before (SELECT VERSION() as
version)
$result = query("SELECT VERSION() as version");
if ($result IS valid) {
fetch_row();
parse the version number;
}
if (mysql > 4.1) { // true for me!
change lang and charset options based on user info;
call SET NAMES and SET CHARACTER SET; // if provided
} else { // not true for me
include phpmyadmin charset_conversion library;
}
}
?>
Expected result:
----------------
phpMyAdmin to not cause a segfault, at least give me the other error
from before... (SELECT VERSION() as version returned empty result set) NOT
segfault
Actual result:
--------------
zend_object_store_get_object (zobject=0x0) at
/usr/local/src/php5-STABLE-200412171930/Zend/zend_objects_API.c:202
202 return
EG(objects_store).object_buckets[handle].bucket.obj.object;
And I have the following backtrace:
#0 zend_object_store_get_object (zobject=0x0) at
/usr/local/src/php5-STABLE-200412171930/Zend/zend_objects_API.c:202
#1 0x0000002a9636005c in php_mysqli_fetch_into_hash (ht=Variable "ht"
is not available.
) at /usr/local/src/php5-STABLE-200412171930/ext/mysqli/mysqli.c:624
#2 0x0000002a9636a08f in zif_mysqli_fetch_array (ht=Variable "ht" is
not available.
) at
/usr/local/src/php5-STABLE-200412171930/ext/mysqli/mysqli_nonapi.c:189
#3 0x0000002a964965c4 in zend_do_fcall_common_helper
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2711
#4 0x0000002a964967d8 in zend_do_fcall_handler (execute_data=Variable
"execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2843
#5 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#6 0x0000002a96496109 in zend_do_fcall_common_helper
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2740
#7 0x0000002a964967d8 in zend_do_fcall_handler (execute_data=Variable
"execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2843
#8 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#9 0x0000002a96496109 in zend_do_fcall_common_helper
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2740
#10 0x0000002a964969c1 in zend_do_fcall_by_name_handler
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2825
#11 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#12 0x0000002a96496109 in zend_do_fcall_common_helper
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2740
#13 0x0000002a964967d8 in zend_do_fcall_handler (execute_data=Variable
"execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2843
#14 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#15 0x0000002a96496109 in zend_do_fcall_common_helper
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2740
#16 0x0000002a964969c1 in zend_do_fcall_by_name_handler
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:2825
#17 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#18 0x0000002a964912fd in zend_include_or_eval_handler
(execute_data=Variable "execute_data" is not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:3565
#19 0x0000002a964a04fe in execute (op_array=Variable "op_array" is not
available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend_execute.c:1400
#20 0x0000002a9646812d in zend_execute_scripts (type=Variable "type" is
not available.
) at /usr/local/src/php5-STABLE-200412171930/Zend/zend.c:1069
#21 0x0000002a964307ff in php_execute_script (primary_file=Variable
"primary_file" is not available.
) at /usr/local/src/php5-STABLE-200412171930/main/main.c:1628
#22 0x0000002a964a0c44 in php_handler (r=Variable "r" is not available.
) at
/usr/local/src/php5-STABLE-200412171930/sapi/apache2handler/sapi_apache2
.c:537
#23 0x0000000000445631 in ap_run_handler (r=0x0) at config.c:151
#24 0x0000000000448479 in ap_invoke_handler (r=0x7535a0) at
config.c:363
#25 0x000000000042d2de in ap_process_request (r=0x7535a0) at
http_request.c:246
#26 0x0000000000428688 in ap_process_http_connection (c=0x746700) at
http_core.c:250
#27 0x00000000004503b1 in ap_run_process_connection (c=0x0) at
connection.c:42
#28 0x0000000000444600 in child_main (child_num_arg=Variable
"child_num_arg" is not available.
) at prefork.c:609
#29 0x0000000000444784 in make_child (s=0x5d0e88, slot=0) at
prefork.c:649
#30 0x000000000044485c in startup_children (number_to_start=5) at
prefork.c:721
#31 0x0000000000444f1c in ap_mpm_run (_pconf=Variable "_pconf" is not
available.
) at prefork.c:940
#32 0x000000000044aae0 in main (argc=Variable "argc" is not available.
) at main.c:617
I have been having somewhat random segfaults in other locations as well.
I don't know if this will assist or is related at all, but I would
often get segfaults if I threw a new CException (a class extending
Exception) inside or nested inside a __destruct. I don't know if this
is an "intentional" behavior, but I changed my code to not call those
functions/etc. from a __destruct.
--
Edit bug report at http://bugs.php.net/?id=31161&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31161&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31161&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31161&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31161&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31161&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31161&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31161&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31161&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31161&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31161&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31161&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31161&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31161&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31161&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31161&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31161&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31161&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31161&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31161&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31161&r=mysqlcfg