首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
Error in `php': double free or corruption (!prev)
系统版本:Amazon Linux AMI release 2014.09 Swoole:2.0.6 demo {{{ <?php ini_set('display_errors', 'on'); @header("Content-Type: text/html; charset=UTF-8"); date_default_timezone_set('Etc/GMT-8'); $http = new swoole_http_server("0.0.0.0", 9501); $http->set( array( 'reactor_num' => 4, //reactor thread num 'worker_num' => 80, //worker process num 'max_coro_num' => 2, 'backlog' => 128, //listen backlog 'max_request' => 50, 'dispatch_mode' => 1, 'buffer_output_size' => 32 * 1024 *1024, //必须为数字 'max_request' => 50, )); $http->on('request', function ($request, $response) { $cli = new Swoole\Coroutine\Http\Client('119.9.116.130', 80); $cli->setHeaders( [ 'Host' => "www.guoxk.com", "User-Agent" => 'Chrome/49.0.2587.3', 'Accept' => 'text/html,application/xhtml+xml,application/xml', 'Accept-Encoding' => 'gzip' ]); $cli->set([ 'timeout' => 0.1 ]); $cli->get('/index.php'); $length = strlen($cli->body); $cli->close(); echo memory_get_usage()/1024/1024, PHP_EOL; $response->end('length:' . $length.print_r($request, 1)); }); $http->start(); }}} 报错信息: > ^@^@^@*** Error in `php': double free or corruption (!prev): 0x0000000001a38810 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7d053)[0x7f26916a1053] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(http_client_free+0x6c)[0x7f268692e66c] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x43288)[0x7f2686930288] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x62ece)[0x7f268694fece] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swClient_free+0x126)[0x7f2686951716] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(php_swoole_client_free+0x99)[0x7f2686916dd9] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(http_client_free+0x88)[0x7f268692e688] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x43ad1)[0x7f2686930ad1] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(coro_handle_timeout+0x16e)[0x7f268691bb1e] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5b4c1)[0x7f26869484c1] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5b5e9)[0x7f26869485e9] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5d7bc)[0x7f268694a7bc] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swWorker_loop+0x25f)[0x7f268695a31f] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x6a52c)[0x7f268695752c] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swManager_start+0x21f)[0x7f2686957a8f] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5a66a)[0x7f268694766a] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swServer_start+0x273)[0x7f268694e473] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x38554)[0x7f2686925554] php[0x8c4c68] php(execute_ex+0x4b)[0x84cbeb] php(zend_execute_scripts+0x1c3)[0x8147d3] php(php_execute_script+0x2d2)[0x7a43d2] php[0x8c6c2c] php[0x43655e] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f2691645b15] php[0x4365fd] 出现core文件,问题必现
发布于6年前 · 1 次浏览 · 来自
提问
l
lapple
系统版本:Amazon Linux AMI release 2014.09 Swoole:2.0.6 demo {{{ <?php ini_set('display_errors', 'on'); @header("Content-Type: text/html; charset=UTF-8"); date_default_timezone_set('Etc/GMT-8'); $http = new swoole_http_server("0.0.0.0", 9501); $http->set( array( 'reactor_num' => 4, //reactor thread num 'worker_num' => 80, //worker process num 'max_coro_num' => 2, 'backlog' => 128, //listen backlog 'max_request' => 50, 'dispatch_mode' => 1, 'buffer_output_size' => 32 * 1024 *1024, //必须为数字 'max_request' => 50, )); $http->on('request', function ($request, $response) { $cli = new Swoole\Coroutine\Http\Client('119.9.116.130', 80); $cli->setHeaders( [ 'Host' => "www.guoxk.com", "User-Agent" => 'Chrome/49.0.2587.3', 'Accept' => 'text/html,application/xhtml+xml,application/xml', 'Accept-Encoding' => 'gzip' ]); $cli->set([ 'timeout' => 0.1 ]); $cli->get('/index.php'); $length = strlen($cli->body); $cli->close(); echo memory_get_usage()/1024/1024, PHP_EOL; $response->end('length:' . $length.print_r($request, 1)); }); $http->start(); }}} 报错信息: > ^@^@^@*** Error in `php': double free or corruption (!prev): 0x0000000001a38810 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7d053)[0x7f26916a1053] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(http_client_free+0x6c)[0x7f268692e66c] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x43288)[0x7f2686930288] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x62ece)[0x7f268694fece] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swClient_free+0x126)[0x7f2686951716] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(php_swoole_client_free+0x99)[0x7f2686916dd9] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(http_client_free+0x88)[0x7f268692e688] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x43ad1)[0x7f2686930ad1] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(coro_handle_timeout+0x16e)[0x7f268691bb1e] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5b4c1)[0x7f26869484c1] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5b5e9)[0x7f26869485e9] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5d7bc)[0x7f268694a7bc] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swWorker_loop+0x25f)[0x7f268695a31f] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x6a52c)[0x7f268695752c] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swManager_start+0x21f)[0x7f2686957a8f] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x5a66a)[0x7f268694766a] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(swServer_start+0x273)[0x7f268694e473] /usr/local/php/lib/php/extensions/no-debug-zts-20131226/swoole.so(+0x38554)[0x7f2686925554] php[0x8c4c68] php(execute_ex+0x4b)[0x84cbeb] php(zend_execute_scripts+0x1c3)[0x8147d3] php(php_execute_script+0x2d2)[0x7a43d2] php[0x8c6c2c] php[0x43655e] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f2691645b15] php[0x4365fd] 出现core文件,问题必现
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2018-06-13
名
名人
max_coro_num 这个配置是? 好像从文档上没看到这个配置选项啊
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。