apache / apache/incubator-pegasus
core in dsn::thrift_message_parser::parse_message
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 328
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
If possible, provide a recipe for reproducing the error.
2. What did you expect to see?
3. What did you see instead?
time: 20190717 11:39:15
cluster: tjwqtst-staging
node: tj1-hadoop-pegasus-tst-ts09
version: 1.11.5
CALL [replica-server] [10.38.162.236:31801] succeed: Pegasus Server 1.11.5 (ba0661d17a96143164d7a0a5c17bb88c0c1dd44d) Release, Started at 2019-07-17 11:39:15
core file: core.replica.asio.3.120767.1563334709
code:
https://github.com/XiaoMi/rdsn/blob/709ea4117fd31b2bd2788dddb1b41f94e8307210/src/core/tools/common/thrift_message_parser.cpp
call stack:
```
#0 0x00007f19d0d7d1d7 in raise () from /lib64/libc.so.6
#1 0x00007f19d0d7e8c8 in abort () from /lib64/libc.so.6
#2 0x00007f19d48b743e in dsn_coredump () at /home/wutao1/pegasus-release/rdsn/src/core/core/service_api_c.cpp:73
#3 0x00007f19d493e843 in dsn::thrift_message_parser::parse_message (thrift_header=..., message_data=...)
at /home/wutao1/pegasus-release/rdsn/src/core/tools/common/thrift_message_parser.cpp:275
#4 0x00007f19d493eb13 in dsn::thrift_message_parser::get_message_on_receive (this=0x50a07ee10, reader=0x59bc4a80, read_next=@0x7f19bc46e04c: 4096)
at /home/wutao1/pegasus-release/rdsn/src/core/tools/common/thrift_message_parser.cpp:72
#5 0x00007f19d495a5ff in operator() (length=, __closure=0x7f19bc46e090, ec=...) at /home/wutao1/pegasus-release/rdsn/src/core/tools/common/asio_rpc_session.cpp:114
#6 operator() (this=0x7f19bc46e090) at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/bind_handler.hpp:127
#7 asio_handler_invoke > (function=...)
at /home/wutao1/boost_1_58_0/output/include/boost/asio/handler_invoke_hook.hpp:69
#8 invoke, dsn::tools::asio_rpc_session::do_read(int)::__lambda2> (context=..., function=...) at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/handler_invoke_helpers.hpp:37
#9 boost::asio::detail::reactive_socket_recv_op::do_complete(boost::asio::detail::io_service_impl *, boost::asio::detail::operation *, const boost::system::error_code &, std::size_t) (owner=, base=)
at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/reactive_socket_recv_op.hpp:110
#10 0x000000000074fec9 in complete (bytes_transferred=, ec=..., owner=..., this=)
at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/task_io_service_operation.hpp:38
#11 do_run_one (ec=..., this_thread=..., lock=..., this=0x29c4620) at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/impl/task_io_service.ipp:372
#12 boost::asio::detail::task_io_service::run (this=0x29c4620, ec=...) at /home/wutao1/boost_1_58_0/output/include/boost/asio/detail/impl/task_io_service.ipp:149
#13 0x00007f19d4952cc6 in run (this=, ec=...) at /home/wutao1/boost_1_58_0/output/include/boost/asio/impl/io_service.ipp:66
#14 operator() (__closure=0x299d930) at /home/wutao1/pegasus-release/rdsn/src/core/tools/common/asio_net_provider.cpp:73
#15 _M_invoke<> (this=0x299d930) at /home/wutao1/app/include/c++/4.8.2/functional:1732
#16 operator() (this=0x299d930) at /home/wutao1/app/include/c++/4.8.2/functional:1720
#17 std::thread::_Impl >::_M_run(void) (this=0x299d918)
at /home/wutao1/app/include/c++/4.8.2/thread:115
#18 0x00007f19d16d5600 in std::(anonymous namespace)::execute_native_thread_routine (__p=)
at /home/qinzuoyan/git.xiaomi/pegasus/toolchain/objdir/../gcc-4.8.2/libstdc++-v3/src/c++11/thread.cc:84
#19 0x00007f19d2348dc5 in start_thread () from /lib64/libpthread.so.0
#20 0x00007f19d0e3f73d in clone () from /lib64/libc.so.6
```
4. What version of Pegasus are you using?
1.11.5
Contributor guide
Research direction
Start with src/core/tools/common/thrift_message_parser.cpp, especially parse_message at line 275 and get_message_on_receive at line 72, using the supplied core and call stack as context. Investigate the crash on Pegasus 1.11.5; done means identifying the cause and preventing this parser path from producing the reported core.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100