swoole / swoole-src

🚀 Coroutine-based concurrency library for PHP
https://www.swoole.com
Apache License 2.0
18.48k stars 3.16k forks source link

php7下报错 #477

Closed benzhan closed 8 years ago

benzhan commented 8 years ago

[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/usr/local/php/bin/php /data/webapps/test.redis2mysql.ouj.com/protected/bin/sta'. Program terminated with signal 11, Segmentation fault.

0 zend_mm_alloc_small (bin_num=, heap=, size=) at /data/sources/php-7.0.0/Zend/zend_alloc.c:1291

1291 heap->free_slot[bin_num] = p->next_free_slot; (gdb) bt

0 zend_mm_alloc_small (bin_num=, heap=, size=) at /data/sources/php-7.0.0/Zend/zend_alloc.c:1291

1 zend_mm_alloc_heap (size=, heap=) at /data/sources/php-7.0.0/Zend/zend_alloc.c:1358

2 _emalloc (size=15) at /data/sources/php-7.0.0/Zend/zend_alloc.c:2442

3 0x000000000073d23b in zend_string_alloc (persistent=0, len=206) at /data/sources/php-7.0.0/Zend/zend_string.h:121

4 zend_string_init (persistent=0, len=206, str=0x7fce670cb919 "") at /data/sources/php-7.0.0/Zend/zend_string.h:157

5 zif_substr (execute_data=0x7fce67014a30, return_value=0x7fce67014980) at /data/sources/php-7.0.0/ext/standard/string.c:2437

6 0x000000000085f2d2 in ZEND_DO_ICALL_SPEC_HANDLER (execute_data=0x7fce670148c0) at /data/sources/php-7.0.0/Zend/zend_vm_execute.h:586

7 0x000000000084fee0 in execute_ex (ex=) at /data/sources/php-7.0.0/Zend/zend_vm_execute.h:417

8 0x00000000008051dd in zend_call_function (fci=0x7fffc1226cd0, fci_cache=0x7fffc1226c50) at /data/sources/php-7.0.0/Zend/zend_execute_API.c:854

9 0x00000000008056da in call_user_function_ex (function_table=, object=, function_name=, retval_ptr=,

param_count=<optimized out>, params=<optimized out>, no_separation=0, symbol_table=0x0) at /data/sources/php-7.0.0/Zend/zend_execute_API.c:679

10 0x00007fce66b43643 in php_swoole_onReceive (serv=, req=) at /data/sources/swoole-src-swoole-1.7.21-stable/swoole_server.c:494

11 0x00007fce66b73e97 in swWorker_onTask (factory=, task=0x7fffc1226eb0) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Worker.c:158

12 0x00007fce66b73f1b in swWorker_onPipeReceive (reactor=, event=0x7fffc1228f20) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Worker.c:472

13 0x00007fce66b66009 in swReactorEpoll_wait (reactor=0x147e440, timeo=) at /data/sources/swoole-src-swoole-1.7.21-stable/src/reactor/ReactorEpoll.c:267

14 0x00007fce66b74997 in swWorker_loop (factory=, worker_id=) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Worker.c:419

15 0x00007fce66b72b83 in swManager_spawn_worker (factory=0x147e110, worker_id=1) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Manager.c:433

16 0x00007fce66b72f86 in swManager_start (factory=0x147e110) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Manager.c:121

17 0x00007fce66b62f94 in swFactoryProcess_start (factory=0x147e110) at /data/sources/swoole-src-swoole-1.7.21-stable/src/factory/FactoryProcess.c:86

18 0x00007fce66b6a021 in swServer_start (serv=0x147dc00) at /data/sources/swoole-src-swoole-1.7.21-stable/src/network/Server.c:586

19 0x00007fce66b45a58 in zif_swoole_server_start (execute_data=, return_value=0x7fce67014190)

at /data/sources/swoole-src-swoole-1.7.21-stable/swoole_server.c:2006

20 0x00000000008913fa in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7fce67014120) at /data/sources/php-7.0.0/Zend/zend_vm_execute.h:842

21 0x000000000084fee0 in execute_ex (ex=) at /data/sources/php-7.0.0/Zend/zend_vm_execute.h:417

22 0x000000000089f479 in zend_execute (op_array=0x7fce6706e0e0, return_value=) at /data/sources/php-7.0.0/Zend/zend_vm_execute.h:458

23 0x00000000008130b4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /data/sources/php-7.0.0/Zend/zend.c:1428

24 0x00000000007b6d73 in php_execute_script (primary_file=0x7fffc122b6b0) at /data/sources/php-7.0.0/main/main.c:2471

25 0x00000000008a0fb1 in do_cli (argc=2, argv=0x1369c40) at /data/sources/php-7.0.0/sapi/cli/php_cli.c:974

26 0x0000000000442698 in main (argc=2, argv=0x1369c40) at /data/sources/php-7.0.0/sapi/cli/php_cli.c:1345

matyhtf commented 8 years ago

1.7.21版本在PHP7下确实有各种问题,在1.7.22中已对PHP7多了兼容和修复的工作。请使用 1.7.22版本

benzhan commented 8 years ago

好的,谢谢Tianfeng的快速修复