|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-03-08 11:34 UTC] o_0 at ukr dot net
Description:
------------
Segmentation fault occasionally occurs during new SphinxClient instance creating.
Test script:
---------------
$sphinx = new SphinxClient();
$sphinx->setConnectTimeout(3);
$sphinx->setServer('db01', 9312);
Actual result:
--------------
Core was generated by `php-fpm: pool www '.
Program terminated with signal 11, Segmentation fault.
#0 0x0834b292 in _zend_hash_add_or_update ()
(gdb) bt
#0 0x0834b292 in _zend_hash_add_or_update ()
#1 0xb4c021d4 in php_sphinx_client_get_properties (object=0xbfcf3108)
at /tmp/php5-sphinx/sphinx-1.2.0/sphinx.c:133
#2 0x0835f506 in zend_std_get_gc ()
#3 0x0835c962 in gc_collect_cycles ()
#4 0x0835d0d5 in gc_zval_possible_root ()
#5 0x08369040 in ?? ()
#6 0x083711f3 in ?? ()
#7 0x083a9a06 in execute ()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Sorry for delay. Here is it: #0 0x0847bfb3 in _zend_is_inconsistent (ht=0x0, file=0x899e780 "/opt/php5-fpm-debug/php-5.4.13/Zend/zend_hash.c", line=204) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend_hash.c:54 #1 0x0847c25e in _zend_hash_add_or_update (ht=0x0, arKey=0xb76f2c55 "error", nKeyLength=6, pData=0xbf8bd150, nDataSize=4, pDest=0x0, flag=1, __zend_filename=0xb76f2c28 "/opt/php5-sphinx-debug/sphinx-1.2.0/sphinx.c", __zend_lineno=133) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend_hash.c:204 #2 0xb76e9c3b in php_sphinx_client_get_properties (object=0xb2cc4964, tsrm_ls=0x992b050) at /opt/php5-sphinx-debug/sphinx-1.2.0/sphinx.c:133 #3 0x0818c064 in json_encode_array (buf=0xbf8bd310, val=0xbf8bd2e4, options=0, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/ext/json/json.c:229 #4 0x08190c85 in php_json_encode (buf=0xbf8bd310, val=0xb2cc4964, options=0, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/ext/json/json.c:640 #5 0x0819134e in zif_json_encode (ht=1, return_value=0xb2ce16ac, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/ext/json/json.c:762 #6 0x084aebb4 in zend_do_fcall_common_helper_SPEC (execute_data=0xb7068e84, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend_vm_execute.h:642 #7 0x084aff43 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xb7068e84, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend_vm_execute.h:752 #8 0x084accd8 in execute (op_array=0xb2cddaf0, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend_vm_execute.h:410 #9 0x0846cc25 in zend_execute_scripts (type=8, tsrm_ls=0x992b050, retval=0x0, file_count=3) at /opt/php5-fpm-debug/php-5.4.13/Zend/zend.c:1315 #10 0x083c937e in php_execute_script (primary_file=0xbf8c19b0, tsrm_ls=0x992b050) at /opt/php5-fpm-debug/php-5.4.13/main/main.c:2492 #11 0x085d3a1c in main (argc=3, argv=0xbf8c1b24) at /opt/php5-fpm-debug/php-5.4.13/sapi/fpm/fpm/fpm_main.c:1924It looks like I finally found what cause the problem exactly. $sphinx = new \SphinxClient(); //$sphinx->setServer('non-existent-host', 9312); //$sphinx->open(); // Bellow will segfault json_encode($sphinx); // or var_dump($sphinx);