Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #1585

Closed
huangzhhui opened this issue Apr 26, 2018 · 3 comments
Closed

Segmentation fault #1585

huangzhhui opened this issue Apr 26, 2018 · 3 comments

Comments

@huangzhhui
Copy link
Contributor

huangzhhui commented Apr 26, 2018

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
    run phpunit and a Segmentation fault
(gdb)
#0  0x00007f9bd6471066 in zim_swoole_redis_coro_close (execute_data=0x7f9bd7015310,
    return_value=0x7ffe99ae88b0) at /swoole/swoole_redis_coro.c:1323
#1  0x000055bc2f197622 in zend_call_function ()
#2  0x000055bc2f1c66d0 in zend_call_method ()
#3  0x00007f9bd64717fc in zim_swoole_redis_coro___destruct (execute_data=0x7f9bd70152c0,
    return_value=<optimized out>) at /swoole/swoole_redis_coro.c:1384
#4  0x000055bc2f197622 in zend_call_function ()
#5  0x000055bc2f1c66d0 in zend_call_method ()
#6  0x000055bc2f1e13c2 in zend_objects_destroy_object ()
#7  0x000055bc2f1e63b1 in zend_objects_store_call_destructors ()
#8  0x000055bc2f19607b in ?? ()
#9  0x000055bc2f1a78d7 in zend_call_destructors ()
#10 0x000055bc2f142a85 in php_request_shutdown ()
#11 0x000055bc2f24ed01 in ?? ()
#12 0x000055bc2ee3836f in ?? ()
#13 0x00007f9bda83bb45 in __libc_start_main (main=0x55bc2ee37ef0, argc=4, argv=0x7ffe99aeaca8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe99aeac98)
    at libc-start.c:287
#14 0x000055bc2ee3849d in _start ()
  1. What did you expect to see?
    passed

  2. What did you see instead?
    Segmentation failt (core dumped)

  3. What version of Swoole are you using (php --ri swoole)?

swoole

swoole support => enabled
Version => 2.1.3
Author => tianfeng.han[email: mikan.tenny@gmail.com]
coroutine => enabled
epoll => enabled
eventfd => enabled
timerfd => enabled
signalfd => enabled
cpu affinity => enabled
spinlock => enabled
rwlock => enabled
async redis client => enabled
async http/websocket client => enabled
openssl => enabled
http2 => enabled
Linux Native AIO => enabled
zlib => enabled
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled

Directive => Local Value => Master Value
swoole.aio_thread_num => 2 => 2
swoole.display_errors => On => On
swoole.use_namespace => On => On
swoole.use_shortname => On => On
swoole.fast_serialize => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

  1. What is your machine environment used (including version of kernel & php & gcc) ?
    4.9.87-linuxkit-aufs
    PHP 7.1.16 (cli) (built: Apr 5 2018 03:15:04) ( NTS )
    gcc version 4.9.2 (Debian 4.9.2-10+deb8u1)

  2. If you are using ssl, what is your openssl version?
    no

@matyhtf
Copy link
Member

matyhtf commented Apr 27, 2018

f 0
p COROG.current_coro
p COROG

More debugging information is needed

@huangzhhui
Copy link
Contributor Author

已无法复现

@matyhtf matyhtf reopened this Apr 27, 2018
@jianwubayiba
Copy link

jianwubayiba commented May 5, 2018

#0 0x00007f3239b6ed4f in zim_swoole_redis_coro_close (execute_data=0x7f3233b87e20, return_value=0x7ffda49fcd50) at /home/download/swoole-src-master/swoole_redis_coro.c:1341 #1 0x0000000000b20a6c in zend_call_function (fci=0x7ffda49fcc70, fci_cache=0x7ffda49fcc10) at /home/download/php-7.2.4/Zend/zend_execute_API.c:833 #2 0x0000000000b62666 in zend_call_method (object=0x7f3233b87df0, obj_ce=0x2e316f0, fn_proxy=0x0, function_name=0x7f3239c1dc58 "close", function_name_len=5, retval_ptr=0x7ffda49fcd50, param_count=0, arg1=0x0, arg2=0x0) at /home/download/php-7.2.4/Zend/zend_interfaces.c:100 #3 0x00007f3239b6f073 in zim_swoole_redis_coro___destruct (execute_data=0x7f3233b87dd0, return_value=0x7ffda49fcf70) at /home/download/swoole-src-master/swoole_redis_coro.c:1386 #4 0x0000000000b20a6c in zend_call_function (fci=0x7ffda49fcf80, fci_cache=0x7ffda49fcf20) at /home/download/php-7.2.4/Zend/zend_execute_API.c:833 #5 0x0000000000b62666 in zend_call_method (object=0x7ffda49fd050, obj_ce=0x2e316f0, fn_proxy=0x7ffda49fd060, function_name=0x13c984e "__destruct", function_name_len=10, retval_ptr=0x0, param_count=0, arg1=0x0, arg2=0x0) at /home/download/php-7.2.4/Zend/zend_interfaces.c:100 #6 0x0000000000b82bd8 in zend_objects_destroy_object (object=0x7f3233b6c6c0) at /home/download/php-7.2.4/Zend/zend_objects.c:146 #7 0x0000000000b89798 in zend_objects_store_del (object=0x7f3233b6c6c0) at /home/download/php-7.2.4/Zend/zend_objects_API.c:173 #8 0x0000000000b36511 in _zval_dtor_func (p=0x7f3233b6c6c0, __zend_filename=0x13cb030 "/home/download/php-7.2.4/Zend/zend_execute.c", __zend_lineno=2103) at /home/download/php-7.2.4/Zend/zend_variables.c:56 #9 0x0000000000b97685 in i_free_compiled_variables (execute_data=0x7f3233b87950) at /home/download/php-7.2.4/Zend/zend_execute.c:2103 #10 0x0000000000b996a1 in zend_leave_helper_SPEC () at /home/download/php-7.2.4/Zend/zend_vm_execute.h:437 #11 0x0000000000b9d706 in zend_dispatch_try_catch_finally_helper_SPEC (try_catch_offset=4294967295, op_num=54) at /home/download/php-7.2.4/Zend/zend_vm_execute.h:1737 #12 0x0000000000b9d8a5 in ZEND_HANDLE_EXCEPTION_SPEC_HANDLER () at /home/download/php-7.2.4/Zend/zend_vm_execute.h:1792 #13 0x0000000000c1ae66 in execute_ex (ex=0x7f3233b87950) at /home/download/php-7.2.4/Zend/zend_vm_execute.h:59806 ---Type <return> to continue, or q <return> to quit---c #14 0x00007f3239b0ef6a in sw_coro_resume (sw_current_context=0x7f3233ae6460, retval=0x7f3233b5d630, coro_retval=0x0) at /home/download/swoole-src-master/swoole_coroutine.c:349 #15 0x00007f3239bbfa3c in swoole_redis_coro_onTimeout (timer=0x7f3239ed5920 <SwooleG>, tnode=0x2fbeae0) at /home/download/swoole-src-master/swoole_redis_coro.c:4387 #16 0x00007f3239bfe7eb in swTimer_select (timer=0x7f3239ed5920 <SwooleG>) at /home/download/swoole-src-master/src/network/Timer.c:214 #17 0x00007f3239bdd49b in swReactor_onTimeout_and_Finish (reactor=0x2ed5930) at /home/download/swoole-src-master/src/reactor/ReactorBase.c:156 #18 0x00007f3239bdd68c in swReactor_onFinish (reactor=0x2ed5930) at /home/download/swoole-src-master/src/reactor/ReactorBase.c:225 #19 0x00007f3239be2ab5 in swReactorEpoll_wait (reactor=0x2ed5930, timeo=0x0) at /home/download/swoole-src-master/src/reactor/ReactorEpoll.c:294 #20 0x00007f3239bfdbc1 in swWorker_loop (factory=0x2ed0300, worker_id=0) at /home/download/swoole-src-master/src/network/Worker.c:782 #21 0x00007f3239bfaa3c in swManager_spawn_worker (factory=0x2ed0300, worker_id=0) at /home/download/swoole-src-master/src/network/Manager.c:507 #22 0x00007f3239bfa360 in swManager_loop (factory=0x2ed0300) at /home/download/swoole-src-master/src/network/Manager.c:386 #23 0x00007f3239bf9719 in swManager_start (factory=0x2ed0300) at /home/download/swoole-src-master/src/network/Manager.c:178 #24 0x00007f3239bdb4c4 in swFactoryProcess_start (factory=0x2ed0300) at /home/download/swoole-src-master/src/factory/FactoryProcess.c:86 #25 0x00007f3239be637b in swServer_start (serv=0x2ecfe70) at /home/download/swoole-src-master/src/network/Server.c:759 #26 0x00007f3239b3f256 in zim_swoole_http_server_start (execute_data=0x7f324041fa00, return_value=0x7ffda49fd850) at /home/download/swoole-src-master/swoole_http_server.c:1686 #27 0x0000000000b9ab9e in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /home/download/php-7.2.4/Zend/zend_vm_execute.h:907 #28 0x0000000000c1ad3c in execute_ex (ex=0x7f324041e030) at /home/download/php-7.2.4/Zend/zend_vm_execute.h:59749 #29 0x0000000000c200fb in zend_execute (op_array=0x7f324047f300, return_value=0x0) ---Type <return> to continue, or q <return> to quit---c at /home/download/php-7.2.4/Zend/zend_vm_execute.h:63760 #30 0x0000000000b3a195 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/download/php-7.2.4/Zend/zend.c:1496 #31 0x0000000000aa8173 in php_execute_script (primary_file=0x7ffda4a00dd0) at /home/download/php-7.2.4/main/main.c:2590 #32 0x0000000000c229db in do_cli (argc=3, argv=0x2c12c10) at /home/download/php-7.2.4/sapi/cli/php_cli.c:1011 #33 0x0000000000c2398e in main (argc=3, argv=0x2c12c10) at /home/download/php-7.2.4/sapi/cli/php_cli.c:1404 (gdb) f 0 #0 0x00007f3239b6ed4f in zim_swoole_redis_coro_close (execute_data=0x7f3233b87e20, return_value=0x7ffda49fcd50) at /home/download/swoole-src-master/swoole_redis_coro.c:1341 1341 head = cb->next; (gdb) p COROG.current_coro $1 = (coro_task *) 0x7f3233bc9030 (gdb) p COROG $2 = {coro_num = 1, max_coro_num = 3000, stack_size = 8192, origin_vm_stack = 0x7f324041e000, origin_vm_stack_top = 0x7f324041fa50, origin_vm_stack_end = 0x7f324045e000, allocated_return_value_ptr = 0x0, origin_ex = 0x7f3239ed4be0 <fake_frame>, root_coro = 0x7f3233bc9030, current_coro = 0x7f3233bc9030, next_coro = 0x0, pending_interrupt = 0 '\000', require = 1 '\001', active = 1 '\001', call_stack_size = 0}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants