php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54646 segmentation fault
Submitted: 2011-05-01 14:26 UTC Modified: 2013-02-18 00:34 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: public at grik dot net Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.3.6 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
44 + 47 = ?
Subscribe to this entry?

 
 [2011-05-01 14:26 UTC] public at grik dot net
Description:
------------
I observe a segfault when running a xenforo package in debug mode.

The configuration of the server is Fedora Core 8, MySQL 5.0.45

I recompiled PHP with debug mode and turned off all extensions not from the 
standard archive.

I found a way to avoid it by recompiling the mysqli extension with mysqlnd driver.

I am not really sure if it was worth to open this report as I don't know how you 
can reproduce it, but at least you'll hear about the issue.

Test script:
---------------
I am not sure I can make a minimal reproducable case. Xenforo is a large package based on Zend Framework.

any call to the xenforo scripts in debug mode crashes php, both fcgi and cli

Actual result:
--------------
backtrace:

Core was generated by `php index.php'.
Program terminated with signal 11, Segmentation fault.
#0 0x083ccebc in add_property_string_ex (arg=0xa62c714,
key=0x7a6fb4 "catalog", key_len=8,
str=0x665f696b <Address 0x665f696b out of bounds>, duplicate=1)
at /usr/src/web/php-5.3.6/Zend/zend_API.c:1524
1524 ZVAL_STRING(tmp, str, duplicate);
(gdb) bt
#0 0x083ccebc in add_property_string_ex (arg=0xa62c714,
key=0x7a6fb4 "catalog", key_len=8,
str=0x665f696b <Address 0x665f696b out of bounds>, duplicate=1)
at /usr/src/web/php-5.3.6/Zend/zend_API.c:1524
#1 0x00799f0c in php_add_field_properties (value=0xa62c714, field=0xa2aea28)
at /usr/src/web/php-5.3.6/ext/mysqli/mysqli_api.c:1056
#2 0x0079a29b in zif_mysqli_fetch_fields (ht=0, return_value=0xa4b8584,
return_value_ptr=0x0, this_ptr=0xa5c9ca0, return_value_used=1)
at /usr/src/web/php-5.3.6/ext/mysqli/mysqli_api.c:1114
#3 0x083f3f03 in zend_do_fcall_common_helper_SPEC (execute_data=0xa055c50)
at /usr/src/web/php-5.3.6/Zend/zend_vm_execute.h:316
#4 0x083f4b3f in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xa055c50)
at /usr/src/web/php-5.3.6/Zend/zend_vm_execute.h:421
#5 0x083f32d2 in execute (op_array=0xa2743b4)
at /usr/src/web/php-5.3.6/Zend/zend_vm_execute.h:107
#6 0x083c7718 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/src/web/php-5.3.6/Zend/zend.c:1194
#7 0x0835bd0c in php_execute_script (primary_file=0xbf889e14)
at /usr/src/web/php-5.3.6/main/main.c:2268
#8 0x0849121c in main (argc=2, argv=0xbf889f74)
at /usr/src/web/php-5.3.6/sapi/cli/php_cli.c:1193
Missing separate debuginfos, use: debuginfo-install keyutils.i386
(gdb)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-01 14:27 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2011-05-01 14:27 UTC] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2011-05-01 21:06 UTC] public at grik dot net
I am sorry, but the bugtrace is already posted in the report.
 [2011-05-01 21:14 UTC] public at grik dot net
-Status: Feedback +Status: Open
 [2011-05-01 21:14 UTC] public at grik dot net
Sorry, I meant backtrace.

Or you need some other one?
 [2011-05-10 16:58 UTC] uw@php.net
-Status: Open +Status: Feedback
 [2011-05-10 16:58 UTC] uw@php.net
Glad to hear mysqlnd works fine.

Its impossible to tell what could be going on with libmysql by just checking the backtrace. You seem to be using an older version of MySQL/libmysql. Could you try a recent version of libmysql?

Also, as hard as it is, it would be most helpful to get a reproducible test script.
 [2011-05-10 18:26 UTC] public at grik dot net
-Status: Feedback +Status: Open
 [2011-05-10 18:26 UTC] public at grik dot net
I'll try with the last MySQL 5.5.11
 [2011-05-11 11:07 UTC] johannes@php.net
-Status: Open +Status: Feedback
 [2011-05-11 11:07 UTC] johannes@php.net
Let's keep the state at feedback till there is some.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 [2013-02-20 06:53 UTC] public at grik dot net
Well, after almost 2 years and complete migtation to mysqlnd, I can't reproduce a 
bug because it involves libmysql. 
I don't see much sence in compiling old PHP and MySQL versions just to reproduce 
this error.
Let's close it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC