apache / apache/incubator-pegasus
bug: core dump when learn
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 328
- PR merge metrics
- No merged PRs in 30d
Description
## Bug Report
### Pegasus Version [2.2.2](https://github.com/apache/incubator-pegasus/tree/v2.2.2)
### Core Dump
```
#1 0x00007f33542c68c8 in abort () from /lib64/libc.so.6
#2 0x00007f3358e1d4ee in dsn_coredump () at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/service_api_c.cpp:94
#3 0x00007f3358bedf36 in dsn::replication::replica::add_potential_secondary (this=0xe0981000, proposal=...) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/replica_config.cpp:165
#4 0x00007f3358bf1057 in dsn::replication::replica::on_config_proposal (this=, proposal=...) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/replica_config.cpp:90
#5 0x00007f3358c61f62 in dsn::replication::replica_stub::on_config_proposal (this=0x2f71800, proposal=...) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/replica_stub.cpp:925
#6 0x00007f3358c85dc5 in bool dsn::serverlet::register_rpc_handler(dsn::task_code, char const*, void (dsn::replication::replica_stub::*)(dsn::replication::configuration_update_request const&))::{lambda(dsn::message_ex*)#1}::operator()(dsn::message_ex*) const (__closure=0x97d8bdc0, request=) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/include/dsn/cpp/serverlet.h:169
#7 0x00007f3358c85dc5 in bool dsn::serverlet::register_rpc_handler(dsn::task_code, char const*, void (dsn::replication::replica_stub::*)(dsn::replication::configuration_update_request const&))::{lambda(dsn::message_ex*)#1}::operator()(dsn::message_ex*) const () from /home/work/app/pegasus/tjwqtst-staging/replica/package/bin/libdsn_replica_server.so
#8 0x00007f3358e71cce in operator() (__args#0=0x91a16e70, this=0x7ac681d0) at /home/jiashuo1/app/toolchain/gcc540/output/include/c++/5.4.0/functional:2267
#9 dsn::rpc_request_task::exec (this=0x7ac68100) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/include/dsn/tool-api/task.h:435
#10 0x00007f3358e753d1 in dsn::task::exec_internal (this=this@entry=0x7ac68100) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task.cpp:176
#11 0x00007f3358e8f98a in dsn::task_worker::loop (this=0x35fca80) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task_worker.cpp:211
#12 0x00007f3358e8fb8d in dsn::task_worker::run_internal (this=0x35fca80) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task_worker.cpp:191
#13 0x00007f3354c24fd0 in std::execute_native_thread_routine (__p=) at /home/jiashuo1/app/toolchain/gcc540/objdir/../gcc-5.4.0/libstdc++-v3/src/c++11/thread.cc:84
```
```
F2021-08-27 15:59:39.88 (1630051179088789086 185958) replica.replica11.0400d631045f08e1: replica_config.cpp:167:add_potential_secondary(): assertion expression: !_primary_states.check_exist(proposal.node, partition_status::PS_PRIMARY)
```
Contributor guide
Research direction
Start with the assertion in rdsn/src/replica/replica_config.cpp at add_potential_secondary, then trace the proposal through on_config_proposal and replica_stub.cpp. Reproduce the learning scenario if possible and determine the expected handling when proposal.node already exists as a primary; done means the reported core dump is addressed and the relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100