apache / apache/incubator-pegasus

fix duplicating&learning(6/n): unknown core dump when loop restart

Open
#770 0 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
C++
Stars
2.1k
Forks
328
PR merge metrics
No merged PRs in 30d

Description

## Bug Report
```
#0 remove_all_duplications (this=) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/duplication/replica_duplicator_manager.h:79
#1 update_duplication_map (new_dup_map=..., this=) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/duplication/replica_duplicator_manager.h:32
#2 dsn::replication::duplication_sync_timer::update_duplication_map (this=this@entry=0x1225e5200, dup_map=...) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/duplication/duplication_sync_timer.cpp:86
#3 0x00007fbba15a02db in dsn::replication::duplication_sync_timer::on_duplication_sync_reply (this=0x1225e5200, err=..., resp=...) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/duplication/duplication_sync_timer.cpp:72
#4 0x00007fbba15a03b2 in operator() (err=..., __closure=0x2c4ca8ba0) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/replica/duplication/duplication_sync_timer.cpp:59
#5 operator() (req=, resp=, err=..., __closure=0x2c4ca8ba0) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/include/dsn/cpp/rpc_holder.h:164
#6 std::_Function_handler::call(const dsn::rpc_address&, dsn::task_tracker*, TCallback&&, int) [with TCallback = dsn::replication::duplication_sync_timer::run()::; TRequest = dsn::replication::duplication_sync_request; TResponse = dsn::replication::duplication_sync_response; dsn::task_ptr = dsn::ref_ptr]:: >::_M_invoke(const std::_Any_data &, , , ) (__functor=..., __args#0=, __args#1=, __args#2=)
at /home/jiashuo1/app/toolchain/gcc540/output/include/c++/5.4.0/functional:1871
#7 0x00007fbba175a417 in operator() (__args#2=0x379ff0f20, __args#1=0x82eca580, __args#0=..., this=) at /home/jiashuo1/app/toolchain/gcc540/output/include/c++/5.4.0/functional:2267
#8 dsn::rpc_response_task::exec (this=) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/include/dsn/tool-api/task.h:477
#9 0x00007fbba175db61 in dsn::task::exec_internal (this=this@entry=0x217605f00) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task.cpp:176
#10 0x00007fbba177811a in dsn::task_worker::loop (this=0x1e4b2c0) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task_worker.cpp:211
#11 0x00007fbba177831d in dsn::task_worker::run_internal (this=0x1e4b2c0) at /home/jiashuo1/work/pegasus-2.2/pegasus/rdsn/src/runtime/task/task_worker.cpp:191
#12 0x00007fbb9dd30fd0 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
#13 0x0000003dc0807851 in start_thread () from /lib64/libpthread.so.0
#14 0x0000003dc04e811d in clone () from /lib64/libc.so.6
```
code url: https://github.com/Shuo-Jia/rdsn/blob/v2.2.1-mi-beta1/src/replica/duplication/replica_duplicator_manager.h#L79

Contributor guide

Open the contributing guide

Research direction

Start with remove_all_duplications and update_duplication_map in src/replica/duplication/replica_duplicator_manager.h, then trace the callers in src/replica/duplication/duplication_sync_timer.cpp at lines 59, 72, and 86. Reproduce the loop-restart scenario and use the reported stack to narrow down the core dump. Done means the loop can restart without producing this crash.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.