Qihoo360 / QConf

Qihoo Distributed Configuration Management System
Other
1.87k stars 534 forks source link

php7 qconf_manager扩展QConfZK循环操作多个zookeeper报段错误 #114

Open 0daypwn opened 5 years ago

0daypwn commented 5 years ago

php7 环境编译 manager/src/php-7/ 扩展 QConfZK
循环操作多个ZK地址时,第一个ZK可以操作成功,第二个ZK就会抛出段错误,zookeeper_close处报错

coredump信息如下:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(no debugging symbols found)...done.
[New LWP 16969]
[New LWP 16970]
[New LWP 16971]
[New LWP 16973]
[New LWP 16974]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php test.php'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f770adf3bd0 in QConfZK::zk_close (this=0x9167210fb2dae4cf) at /data/build/QConf/manager/src/c/qconf_zk.cc:68
68      zookeeper_close(zh);
Missing separate debuginfos, use: debuginfo-install php-cli-7.1.28-1.el7.remi.x86_64
(gdb) bt
#0  0x00007f770adf3bd0 in QConfZK::zk_close (this=0x9167210fb2dae4cf) at /data/build/QConf/manager/src/c/qconf_zk.cc:68
#1  0x000055d93f049835 in zend_call_function ()
#2  0x000055d93f0784c4 in zend_call_method ()
#3  0x000055d93f093c14 in zend_objects_destroy_object ()
#4  0x000055d93f0991cc in zend_objects_store_del ()
#5  0x000055d93f0a4f99 in ZEND_ASSIGN_SPEC_CV_VAR_RETVAL_UNUSED_HANDLER ()
#6  0x000055d93f0a3f1b in execute_ex ()
#7  0x000055d93f0ff7e8 in zend_execute ()
#8  0x000055d93f059ca3 in zend_execute_scripts ()
#9  0x000055d93eff5500 in php_execute_script ()
#10 0x000055d93f101a4c in do_cli ()
#11 0x000055d93ee8609a in main ()