andreiz / php-zookeeper

A PHP extension for interfacing with Apache ZooKeeper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segment fault

doubaokun opened this issue · comments

I run PHP in daemon mode, some times PHP die with segment fault. That occurs when the process receive watch events or subscribe the watch events.

Program terminated with signal 11, Segmentation fault.
#0 php_zk_watcher_marshal (zk=, type=-1, state=, path=,
context=0x0) at /home/bruce/Src/php-zookeeper/php_zookeeper.c:782
782 cb_data->fci.retval_ptr_ptr = &retval;
(gdb) bt
#0 php_zk_watcher_marshal (zk=, type=-1, state=, path=,
context=0x0) at /home/bruce/Src/php-zookeeper/php_zookeeper.c:782
#1 0x00007f8fce30fe42 in do_foreach_watcher (state=3, type=-1, path=0x7f8fc0000940 "", zh=0x1f09490,
wo=0x7f8fc8002380) at src/zk_hashtable.c:279
#2 deliverWatchers (zh=zh@entry=0x1f09490, type=type@entry=-1, state=state@entry=3,
path=0x7f8fc0000940 "", list=list@entry=0x7f8fc8002510) at src/zk_hashtable.c:321
#3 0x00007f8fce305690 in process_completions (zh=zh@entry=0x1f09490) at src/zookeeper.c:2108
#4 0x00007f8fce3102c1 in do_completion (v=0x1f09490) at src/mt_adaptor.c:466
#5 0x00007f8fd03f7f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00007f8fd0706e1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Another segment falut:

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff81694000
Core was generated by `php SimpleConsumer.php'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000006fb564 in zend_std_object_get_class ()
(gdb) bt
#0 0x00000000006fb564 in zend_std_object_get_class ()
#1 0x000000000070f8d0 in ?? ()
#2 0x00000000007476a8 in execute_ex ()
#3 0x00000000006da359 in zend_execute_scripts ()
#4 0x000000000067906c in php_execute_script ()
#5 0x000000000078add4 in ?? ()
#6 0x00000000004647d4 in main ()
(gdb)

Segment fault always happen at
2013-08-30 11:55:17,591:1583(0x7f7a11cdd700):ZOO_DEBUG@process_completions@2107: Calling a watcher for node [/test/a], type = -1 event=ZOO_CHILD_EVENT
[1] 1583 segmentation fault (core dumped)

2013-08-30 12:45:24,560:1920(0x7fab65d4c700):ZOO_DEBUG@process_sync_completion@1868: Processing sync_completion with type=1 xid=0x522025c9 rc=0
2013-08-30 12:45:24,560:1920(0x7fab65d4c700):ZOO_DEBUG@do_io@446: IO thread terminated
2013-08-30 12:45:24,560:1920(0x7fab64aa5700):ZOO_DEBUG@do_completion@469: completion thread terminated
2013-08-30 12:45:24,560:1920(0x7fab6a576740):ZOO_INFO@zookeeper_close@2505: Closing zookeeper sessionId=0x140c874b2490114 to [192.168.1.149:2181]

[1] 1920 segmentation fault (core dumped)

I received the same problem, how do you solve it finally?

got the same problem, any update?

Is this the same problem with php-zookeeper#8 ?