-
Notifications
You must be signed in to change notification settings - Fork 309
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
Pegasus Coredump at boost.asio epoll_reactor 1.11.5 #387
Comments
The coredump point (boost/asio/detail/impl/epoll_reactor.ipp:219) is:
|
我怀疑锁使用得不对。现在是用的读写锁,在调用 |
这里应该不能简单地用锁来防止竞态条件
async_read_some 执行的时候是在 io_service 中排队执行的,但是有同步的方法会立即关闭 socket。
由于我们的 io_service 是多线程环境下运行的,所以会产生 A 线程关闭了 socket 之后,B线程又尝试去读取,引发 issue 中所提及的 coredump 问题。 一个最简单的方法是,把 worker_count 设置为 1,单线程运行 io_service。但需要测试性能 |
性能测试结果不好,asio 线程把单核负载打满了都没法撑起原来 4 线程 asio 的流量 |
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
Normal bootstrap. c3srv-xiaoai, on replica-server (2019/08/29).
No coredump.
Coredump Stack:
Pegasus-server 1.11.5
The text was updated successfully, but these errors were encountered: