php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69225 PHP5-fpm segfault on mysql server switch in phpMyAdmin
Submitted: 2015-03-11 23:51 UTC Modified: 2016-08-05 14:02 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: php at sibrenvasse dot nl Assigned: laruence (profile)
Status: Assigned Package: MySQLi related
PHP Version: 5.6.6 OS: Debian Jessie
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-03-11 23:51 UTC] php at sibrenvasse dot nl
Description:
------------
I have phpMyAdmin (4.2.12deb2) configured with two MariaDB (10.0.16) instances (one production server on port 3306 and one development server, on port 3307). When I'm logged on on both mysql servers in phpMyAdmin, I can switch between them with a dropdown menu on the top left. When I do this, PHP5-fpm segfaults.

Actual result:
--------------
#0  0x00000000006c0898 in ?? ()
#1  0x00000000006856bd in php_verror ()
#2  0x0000000000685b0b in php_error_docref0 ()
#3  0x00007f3b7ff8d228 in php_mysqli_throw_sql_exception () from /usr/lib/php5/20131226/mysqli.so
#4  0x00007f3b7ff8a4ec in mysqli_common_connect () from /usr/lib/php5/20131226/mysqli.so
#5  0x00007f3b7ff85281 in zif_mysqli_real_connect () from /usr/lib/php5/20131226/mysqli.so
#6  0x00000000006d949a in dtrace_execute_internal ()
#7  0x00007f3b85eaad75 in xdebug_execute_internal (current_execute_data=0x7f3b8ab44400, fci=0x0, return_value_used=1)
    at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1551
#8  0x0000000000797520 in ?? ()
#9  0x0000000000727570 in execute_ex ()
#10 0x00000000006d9338 in dtrace_execute_ex ()
#11 0x00007f3b85eaa274 in xdebug_execute_ex (execute_data=0x7f3b8ab44400) at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1437
#12 0x0000000000797a4e in ?? ()
#13 0x0000000000727570 in execute_ex ()
#14 0x00000000006d9338 in dtrace_execute_ex ()
#15 0x00007f3b85eaa274 in xdebug_execute_ex (execute_data=0x7f3b8ab44210) at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1437
#16 0x0000000000797a4e in ?? ()
#17 0x0000000000727570 in execute_ex ()
#18 0x00000000006d9338 in dtrace_execute_ex ()
#19 0x00007f3b85eaa274 in xdebug_execute_ex (execute_data=0x7f3b8ab44088) at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1437
#20 0x0000000000797a4e in ?? ()
#21 0x0000000000727570 in execute_ex ()
#22 0x00000000006d9338 in dtrace_execute_ex ()
#23 0x00007f3b85eaa274 in xdebug_execute_ex (execute_data=0x7f3b8ab43e10) at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1437
#24 0x0000000000796c68 in ?? ()
#25 0x0000000000727570 in execute_ex ()
#26 0x00000000006d9338 in dtrace_execute_ex ()
#27 0x00007f3b85eaa274 in xdebug_execute_ex (execute_data=0x7f3b8ab43bd8) at /tmp/buildd/xdebug-2.2.5/xdebug-2.2.5/xdebug.c:1437
#28 0x00000000006ebd30 in zend_execute_scripts ()
#29 0x0000000000687d1b in php_execute_script ()
#30 0x0000000000465037 in main ()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-03-12 04:21 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-03-12 04:21 UTC] laruence@php.net
could you please disable xdebug, then try agian?
 [2015-03-12 08:16 UTC] php at sibrenvasse dot nl
-Status: Feedback +Status: Open
 [2015-03-12 08:16 UTC] php at sibrenvasse dot nl
I disabled the extension, but my issue still persists.

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

#0  0x00000000006c0898 in ?? ()
#1  0x00000000006856bd in php_verror ()
#2  0x0000000000685b0b in php_error_docref0 ()
#3  0x00007f08414fc228 in php_mysqli_throw_sql_exception () from /usr/lib/php5/20131226/mysqli.so
#4  0x00007f08414f94ec in mysqli_common_connect () from /usr/lib/php5/20131226/mysqli.so
#5  0x00007f08414f4281 in zif_mysqli_real_connect () from /usr/lib/php5/20131226/mysqli.so
#6  0x00000000006d949a in dtrace_execute_internal ()
#7  0x0000000000797520 in ?? ()
#8  0x0000000000727570 in execute_ex ()
#9  0x00000000006d9338 in dtrace_execute_ex ()
#10 0x0000000000797a4e in ?? ()
#11 0x0000000000727570 in execute_ex ()
#12 0x00000000006d9338 in dtrace_execute_ex ()
#13 0x0000000000797a4e in ?? ()
#14 0x0000000000727570 in execute_ex ()
#15 0x00000000006d9338 in dtrace_execute_ex ()
#16 0x0000000000797a4e in ?? ()
#17 0x0000000000727570 in execute_ex ()
#18 0x00000000006d9338 in dtrace_execute_ex ()
#19 0x0000000000796c68 in ?? ()
#20 0x0000000000727570 in execute_ex ()
#21 0x00000000006d9338 in dtrace_execute_ex ()
#22 0x00000000006ebd30 in zend_execute_scripts ()
#23 0x0000000000687d1b in php_execute_script ()
#24 0x0000000000465037 in main ()
 [2015-03-14 03:36 UTC] laruence@php.net
hmm, it's better if you could build php.5.6.6 by you self, and with --enable-debug, thus we could see which line in src codes cause that..

thanks
 [2015-03-14 03:37 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-03-14 20:44 UTC] php at sibrenvasse dot nl
-Status: Feedback +Status: Open
 [2015-03-14 20:44 UTC] php at sibrenvasse dot nl
I compiled php5.6.6 with --enable-debug and this was the result.

Actual result:
--------------
#0  _zend_mm_free_int (heap=0x24b86f0, p=0x7f5681f28058) at /usr/local/src/php-5.6.6/Zend/zend_alloc.c:2104
#1  0x0000000000788fbd in php_verror (docref=0x29e4958 "@Ы\002", params=0xce96eb "", type=2, 
    format=0xfead03ec2ca8 <error: Cannot access memory at address 0xfead03ec2ca8>, format@entry=0x2 <error: Cannot access memory at address 0x2>, 
    args=0x7f5681f28048, args@entry=0x7ffe51828178) at /usr/local/src/php-5.6.6/main/main.c:938
#2  0x00000000007893de in php_error_docref0 (docref=docref@entry=0x0, type=type@entry=2, format=format@entry=0xce20e1 "(%s/%d): %s")
    at /usr/local/src/php-5.6.6/main/main.c:952
#3  0x000000000060524f in php_mysqli_throw_sql_exception (sqlstate=0x271b979 "HY000", errorno=1045, format=<optimized out>)
    at /usr/local/src/php-5.6.6/ext/mysqli/mysqli_exception.c:50
#4  0x000000000060282c in mysqli_common_connect (ht=38504176, return_value=0x2b0f778, return_value_ptr=0xfead03ec2ca8, this_ptr=0x7f5681f28058, 
    return_value_used=-2114813880, is_real_connect=0 '\000', is_real_connect@entry=1 '\001', in_ctor=0 '\000')
    at /usr/local/src/php-5.6.6/ext/mysqli/mysqli_nonapi.c:248
#5  0x00000000005fdae1 in zif_mysqli_real_connect (ht=<optimized out>, return_value=<optimized out>, return_value_ptr=<optimized out>, 
    this_ptr=<optimized out>, return_value_used=<optimized out>) at /usr/local/src/php-5.6.6/ext/mysqli/mysqli_api.c:1972
#6  0x00000000008940be in zend_do_fcall_common_helper_SPEC (execute_data=0x7f5682039de8) at /usr/local/src/php-5.6.6/Zend/zend_vm_execute.h:558
#7  0x0000000000820740 in execute_ex (execute_data=0x7f5682039de8) at /usr/local/src/php-5.6.6/Zend/zend_vm_execute.h:363
#8  0x00000000007ebc10 in zend_execute_scripts (type=38504176, type@entry=8, retval=0x7f5681f28058, retval@entry=0x0, file_count=65809576, 
    file_count@entry=3) at /usr/local/src/php-5.6.6/Zend/zend.c:1341
#9  0x000000000078b3d1 in php_execute_script (primary_file=0x7ffe5182aa60) at /usr/local/src/php-5.6.6/main/main.c:2578
#10 0x00000000004309bb in main (argc=-2113746088, argv=0x7f568202c558) at /usr/local/src/php-5.6.6/sapi/fpm/fpm/fpm_main.c:1964
 [2016-08-05 14:02 UTC] cmb@php.net
-Assigned To: +Assigned To: laruence
 [2016-08-05 14:02 UTC] cmb@php.net
That appears to be the same problem as reported in
<https://github.com/libgd/libgd/issues/252#issuecomment-232319236>.

@laruence Can you please have a look at this issue?
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Mon Jun 25 08:01:50 2018 UTC