baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.97k stars 884 forks source link

测试中发现install snapshot死锁 #139

Closed demiaowu closed 5 years ago

demiaowu commented 5 years ago

代码版本:release 版本 1.0.1 场景:一个进程有上百个落后的copyset,重启后并发恢复出现死锁,gdb堆栈如下:

Thread 81 (Thread 0x7fee977fe700 (LWP 579089)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x4555240) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee787c7e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee787c7e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x4554ff0) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x4555480) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x4555480)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x4555480)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

---Type <return> to continue, or q <return> to quit---
Thread 80 (Thread 0x7fee97fff700 (LWP 579088)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee96ffdaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee96ffdaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fee7c4599c0, request=0x7fee7c025060, 
    response=0x7fee7cd69d70, done=0x7fee7c41c890, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fee7c4599c0, request=0x7fee7c025060, 
    response=0x7fee7cd69d70, done=0x7fee7c41c890) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fee7c4599c0, request=
    0x7fee7c025060, response=0x7fee7cd69d70, done=0x7fee7c41c890)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef18057c80)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef18057c80) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 79 (Thread 0x7fee8bfff700 (LWP 579087)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x4555240) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee72565aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee72565aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x4554ff0, cntl=0x7fee849ff160, request=0x7fee84a1e420, 
    response=0x7fee85446e30, done=0x7fee8412da50, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fee849ff160, request=0x7fee84a1e420, 
    response=0x7fee85446e30, done=0x7fee8412da50) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fee849ff160, 
    request=0x7fee84a1e420, response=0x7fee85446e30, done=0x7fee8412da50)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feea403c440)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feea403c440) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 78 (Thread 0x7feeacff9700 (LWP 579086)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef04585c98) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef04585c98) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef04585c98) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef51df9d70)
---Type <return> to continue, or q <return> to quit---
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef51df9d70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x0000000000666285 in braft::RemoteFileCopier::Session::on_rpc_returned (this=0x7fef04585c90)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.cpp:247
#9  0x0000000000667676 in braft::RemoteFileCopier::Session::Closure::Run (this=0x7fef04585d30)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.h:67
#10 0x0000000000675a48 in brpc::Controller::EndRPC (this=0x7fef04585d40, info=...) at external/com_github_brpc_brpc/src/brpc/controller.cpp:890
#11 0x0000000000674ec2 in brpc::Controller::RunEndRPC (arg=0x7fef04585d40) at external/com_github_brpc_brpc/src/brpc/controller.cpp:679
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 77 (Thread 0x7feead7fa700 (LWP 579085)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feee83cc270) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7feee83cc270) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feee83cc270) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3e2e2c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7feee83cc260, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7feee83cc260) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feee83cc260)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
---Type <return> to continue, or q <return> to quit---
#12 0x0000000000000000 in ?? ()

Thread 76 (Thread 0x7feeadffb700 (LWP 579084)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2292730) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3e8e8aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef3e8e8aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22924e0, cntl=0x7fee9cfbb570, request=0x7fee9c00d310, 
    response=0x7fee9ca38bc0, done=0x7fee9c80b8a0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fee9cfbb570, request=0x7fee9c00d310, 
    response=0x7fee9ca38bc0, done=0x7fee9c80b8a0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fee9cfbb570, 
    request=0x7fee9c00d310, response=0x7fee9ca38bc0, done=0x7fee9c80b8a0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feee80d0350)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feee80d0350) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 75 (Thread 0x7feeae7fc700 (LWP 579083)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7feed01f2aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7feed01f2aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7fee984db3c0, request=0x7fee9801e6f0, 
    response=0x7fee99137af0, done=0x7fee98100d30, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fee984db3c0, request=0x7fee9801e6f0, 
    response=0x7fee99137af0, done=0x7fee98100d30) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fee984db3c0, 
    request=0x7fee9801e6f0, response=0x7fee99137af0, done=0x7fee98100d30)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feea40402c0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feea40402c0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 74 (Thread 0x7feeaeffd700 (LWP 579082)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x231a090) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x231a090) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
---Type <return> to continue, or q <return> to quit---
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x231a090) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef503dfaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef503dfaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2319e40, cntl=0x7feea4a01e70, request=0x7feea405ab70, 
    response=0x7feea4f21ee0, done=0x7feea4094520, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feea4a01e70, request=0x7feea405ab70, 
    response=0x7feea4f21ee0, done=0x7feea4094520) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feea4a01e70, 
    request=0x7feea405ab70, response=0x7feea4f21ee0, done=0x7feea4094520)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef2403e0b0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef2403e0b0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 73 (Thread 0x7feeaf7fe700 (LWP 579081)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x4555240) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee74585aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee74585aa0, __m=...)
---Type <return> to continue, or q <return> to quit---
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x4554ff0, cntl=0x7feea0044000, request=0x7feea0150f10, 
    response=0x7feea005f0f0, done=0x7feea005f020, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feea0044000, request=0x7feea0150f10, 
    response=0x7feea005f0f0, done=0x7feea005f020) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feea0044000, 
    request=0x7feea0150f10, response=0x7feea005f0f0, done=0x7feea005f020)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feee001c280)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feee001c280) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 72 (Thread 0x7feeaffff700 (LWP 579080)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2e1cc30) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2e1cc30) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2e1cc30) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee772b2aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee772b2aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2e1c9e0, cntl=0x7feea802e2a0, request=0x7feea80d72d0, 
    response=0x7feea80e3970, done=0x7feea80e3c80, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feea802e2a0, request=0x7feea80d72d0, 
---Type <return> to continue, or q <return> to quit---
    response=0x7feea80e3970, done=0x7feea80e3c80) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feea802e2a0, 
    request=0x7feea80d72d0, response=0x7feea80e3970, done=0x7feea80e3c80)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feee001c200)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feee001c200) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 71 (Thread 0x7feed0ff9700 (LWP 579079)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2e29480) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2e29480) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2e29480) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee7a7e7e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee7a7e7e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x2e29230) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2e296c0) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2e296c0)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2e296c0)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
---Type <return> to continue, or q <return> to quit---
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 70 (Thread 0x7feed17fa700 (LWP 579078)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2d1c0d0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2d1c0d0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2d1c0d0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6e424e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6e424e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x2d1be80) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2d1c310) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2d1c310)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2d1c310)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 69 (Thread 0x7feed1ffb700 (LWP 579077)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feec80bcee0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
---Type <return> to continue, or q <return> to quit---
#4  pthread_mutex_lock (__mutex=0x7feec80bcee0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feec80bcee0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6c101c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7feec80bced0, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7feec80bced0) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feec80bced0)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 68 (Thread 0x7feed27fc700 (LWP 579076)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef2804acf0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef2804acf0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef2804acf0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee7a4e4c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef2804ace0, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef2804ace0) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef2804ace0)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
---Type <return> to continue, or q <return> to quit---
#12 0x0000000000000000 in ?? ()

Thread 67 (Thread 0x7feed2ffd700 (LWP 579075)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2292730) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee75797e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee75797e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x22924e0) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2292970) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2292970)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2292970)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 66 (Thread 0x7feed37fe700 (LWP 579074)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2e1cc30) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2e1cc30) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
---Type <return> to continue, or q <return> to quit---
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2e1cc30) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee88dd4e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee88dd4e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x2e1c9e0) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2e1ce70) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2e1ce70)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2e1ce70)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 65 (Thread 0x7feed3fff700 (LWP 579073)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef481101c8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef481101c8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef481101c8) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6bdfed70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6bdfed70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x0000000000666285 in braft::RemoteFileCopier::Session::on_rpc_returned (this=0x7fef481101c0)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.cpp:247
#9  0x0000000000667676 in braft::RemoteFileCopier::Session::Closure::Run (this=0x7fef48110260)
---Type <return> to continue, or q <return> to quit---
    at external/com_github_brpc_braft/src/braft/remote_file_copier.h:67
#10 0x0000000000675a48 in brpc::Controller::EndRPC (this=0x7fef48110270, info=...) at external/com_github_brpc_brpc/src/brpc/controller.cpp:890
#11 0x0000000000674ec2 in brpc::Controller::RunEndRPC (arg=0x7fef48110270) at external/com_github_brpc_brpc/src/brpc/controller.cpp:679
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 64 (Thread 0x7feef0ff9700 (LWP 579072)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x21c0de0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee957e5e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee957e5e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x21c0b90) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x21c1020) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x21c1020)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x21c1020)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 63 (Thread 0x7feef17fa700 (LWP 579071)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee73676aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee73676aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2da7a70, cntl=0x7feed80a4700, request=0x7feed804aaf0, 
    response=0x7feed8112e50, done=0x7feed80372e0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feed80a4700, request=0x7feed804aaf0, 
    response=0x7feed8112e50, done=0x7feed80372e0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feed80a4700, 
    request=0x7feed804aaf0, response=0x7feed8112e50, done=0x7feed80372e0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feea003e5f0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feea003e5f0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 62 (Thread 0x7feef1ffb700 (LWP 579070)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
---Type <return> to continue, or q <return> to quit---
#4  pthread_mutex_lock (__mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2292730) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef51ffbaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef51ffbaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22924e0, cntl=0x7feed412af10, request=0x7feed4f484f0, 
    response=0x7feed414a120, done=0x7feed4106990, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feed412af10, request=0x7feed4f484f0, 
    response=0x7feed414a120, done=0x7feed4106990) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feed412af10, 
    request=0x7feed4f484f0, response=0x7feed414a120, done=0x7feed4106990)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef800604e0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef800604e0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 61 (Thread 0x7feef27fc700 (LWP 579069)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef509e5aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
---Type <return> to continue, or q <return> to quit---
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef509e5aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7feee17e44a0, request=0x7feee0cab510, 
    response=0x7feee006ea00, done=0x7feee1064500, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feee17e44a0, request=0x7feee0cab510, 
    response=0x7feee006ea00, done=0x7feee1064500) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feee17e44a0, 
    request=0x7feee0cab510, response=0x7feee006ea00, done=0x7feee1064500)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feee001c000)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feee001c000) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 60 (Thread 0x7feef2ffd700 (LWP 579068)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee74888e70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee74888e70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x2ca5fa0) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2ca6430) at external/com_github_brpc_braft/src/braft/node.cpp:3133
---Type <return> to continue, or q <return> to quit---
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2ca6430)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2ca6430)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 59 (Thread 0x7feef37fe700 (LWP 579067)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x449ee10) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x449ee10) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x449ee10) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee8a1e8aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee8a1e8aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x449ebc0, cntl=0x7feee8096e80, request=0x7feee80cade0, 
    response=0x7feee808df90, done=0x7feee80b9f40, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feee8096e80, request=0x7feee80cade0, 
    response=0x7feee808df90, done=0x7feee80b9f40) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feee8096e80, 
    request=0x7feee80cade0, response=0x7feee808df90, done=0x7feee80b9f40)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef7c074e80)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef7c074e80) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
---Type <return> to continue, or q <return> to quit---
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 58 (Thread 0x7feef3fff700 (LWP 579066)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef1c01c640) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef1c01c640) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef1c01c640) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee8b1f8c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef1c01c630, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef1c01c630) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef1c01c630)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 57 (Thread 0x7fef10ff9700 (LWP 579065)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2292730) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2292730) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
---Type <return> to continue, or q <return> to quit---
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee899e0aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee899e0aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22924e0, cntl=0x7feeec06f490, request=0x7feeec0ec590, 
    response=0x7feeec037910, done=0x7feeec0c9250, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feeec06f490, request=0x7feeec0ec590, 
    response=0x7feeec037910, done=0x7feeec0c9250) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feeec06f490, 
    request=0x7feeec0ec590, response=0x7feeec037910, done=0x7feeec0c9250)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef7c071500)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef7c071500) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 56 (Thread 0x7fef117fa700 (LWP 579064)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef18ef30f8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef18ef30f8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef18ef30f8) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6e121d70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6e121d70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
---Type <return> to continue, or q <return> to quit---
#8  0x0000000000666285 in braft::RemoteFileCopier::Session::on_rpc_returned (this=0x7fef18ef30f0)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.cpp:247
#9  0x0000000000667676 in braft::RemoteFileCopier::Session::Closure::Run (this=0x7fef18ef3190)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.h:67
#10 0x0000000000675a48 in brpc::Controller::EndRPC (this=0x7fef18ef31a0, info=...) at external/com_github_brpc_brpc/src/brpc/controller.cpp:890
#11 0x0000000000674ec2 in brpc::Controller::RunEndRPC (arg=0x7fef18ef31a0) at external/com_github_brpc_brpc/src/brpc/controller.cpp:679
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 55 (Thread 0x7fef11ffb700 (LWP 579063)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feea0143ab0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7feea0143ab0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feea0143ab0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee71c5ce10)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062ae74 in braft::LocalSnapshotCopier::load_meta_table (this=0x7feea0143aa0)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:794
#8  0x000000000062a99e in braft::LocalSnapshotCopier::copy (this=0x7feea0143aa0) at external/com_github_brpc_braft/src/braft/snapshot.cpp:748
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feea0143aa0)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 54 (Thread 0x7fef127fc700 (LWP 579062)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee7b1f1aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee7b1f1aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fef0001c630, request=0x7fef000b11e0, 
    response=0x7fef000df5b0, done=0x7fef00094470, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef0001c630, request=0x7fef000b11e0, 
    response=0x7fef000df5b0, done=0x7fef00094470) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef0001c630, 
    request=0x7fef000b11e0, response=0x7fef000df5b0, done=0x7fef00094470)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef200239c0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef200239c0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 53 (Thread 0x7fef12ffd700 (LWP 579061)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
---Type <return> to continue, or q <return> to quit---
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3ececaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef3ececaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7feefd926090, request=0x7feefc22d2d0, 
    response=0x7feefd9bdc90, done=0x7feefc1e0dc0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7feefd926090, request=0x7feefc22d2d0, 
    response=0x7feefd9bdc90, done=0x7feefc1e0dc0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7feefd926090, 
    request=0x7feefc22d2d0, response=0x7feefd9bdc90, done=0x7feefc1e0dc0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef14021820)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef14021820) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 52 (Thread 0x7fef137fe700 (LWP 579060)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef8431ec90) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef8431ec90) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef8431ec90) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef50febc60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
---Type <return> to continue, or q <return> to quit---
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef8431ec80, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef8431ec80) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef8431ec80)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 51 (Thread 0x7fef13fff700 (LWP 579059)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fee9cedddd8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fee9cedddd8) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fee9cedddd8) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6e020d70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6e020d70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x0000000000666285 in braft::RemoteFileCopier::Session::on_rpc_returned (this=0x7fee9cedddd0)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.cpp:247
#9  0x0000000000667676 in braft::RemoteFileCopier::Session::Closure::Run (this=0x7fee9cedde70)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.h:67
#10 0x0000000000675a48 in brpc::Controller::EndRPC (this=0x7fee9cedde80, info=...) at external/com_github_brpc_brpc/src/brpc/controller.cpp:890
#11 0x0000000000674ec2 in brpc::Controller::RunEndRPC (arg=0x7fee9cedde80) at external/com_github_brpc_brpc/src/brpc/controller.cpp:679
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---

Thread 50 (Thread 0x7fef30ff1700 (LWP 579058)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee74e8eaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee74e8eaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fef0c2ff1f0, request=0x7fef0c0b8a00, 
    response=0x7fef0c183450, done=0x7fef0c0df7f0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef0c2ff1f0, request=0x7fef0c0b8a00, 
    response=0x7fef0c183450, done=0x7fef0c0df7f0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef0c2ff1f0, 
    request=0x7fef0c0b8a00, response=0x7fef0c183450, done=0x7fef0c0df7f0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef18057500)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef18057500) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 49 (Thread 0x7fef317f2700 (LWP 579057)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef512eeaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef512eeaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fef1a1f2dd0, request=0x7fef18d12ee0, 
    response=0x7fef18148060, done=0x7fef180535e0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef1a1f2dd0, request=0x7fef18d12ee0, 
    response=0x7fef18148060, done=0x7fef180535e0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef1a1f2dd0, 
    request=0x7fef18d12ee0, response=0x7fef18148060, done=0x7fef180535e0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef5406b520)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef5406b520) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 48 (Thread 0x7fef31ff3700 (LWP 579056)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x21c0de0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
---Type <return> to continue, or q <return> to quit---
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee89ae1aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee89ae1aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x21c0b90, cntl=0x7fef14042f50, request=0x7fef14edbdc0, 
    response=0x7fef1401bae0, done=0x7fef140652a0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef14042f50, request=0x7fef14edbdc0, 
    response=0x7fef1401bae0, done=0x7fef140652a0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef14042f50, 
    request=0x7fef14edbdc0, response=0x7fef1401bae0, done=0x7fef140652a0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef4401fbb0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef4401fbb0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 47 (Thread 0x7fef327f4700 (LWP 579055)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee94ad8aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee94ad8aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
---Type <return> to continue, or q <return> to quit---
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2da7a70, cntl=0x7fef20b56360, request=0x7fef2008ff30, 
    response=0x7fef203220d0, done=0x7fef207c3470, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef20b56360, request=0x7fef2008ff30, 
    response=0x7fef203220d0, done=0x7fef207c3470) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef20b56360, 
    request=0x7fef2008ff30, response=0x7fef203220d0, done=0x7fef207c3470)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef0803beb0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef0803beb0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 46 (Thread 0x7fef32ff5700 (LWP 579054)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feed8112ed0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7feed8112ed0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feed8112ed0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee78ecec60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7feed8112ec0, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7feed8112ec0) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feed8112ec0)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
---Type <return> to continue, or q <return> to quit---
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 45 (Thread 0x7fef337f6700 (LWP 579053)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef480e2b60) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef480e2b60) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef480e2b60) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee74b8bc60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef480e2b50, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef480e2b50) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef480e2b50)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 44 (Thread 0x7fef33ff7700 (LWP 579052)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee73171aa0)
---Type <return> to continue, or q <return> to quit---
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee73171aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fef24067ed0, request=0x7fef24307da0, 
    response=0x7fef24111a10, done=0x7fef24068240, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef24067ed0, request=0x7fef24307da0, 
    response=0x7fef24111a10, done=0x7fef24068240) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef24067ed0, 
    request=0x7fef24307da0, response=0x7fef24111a10, done=0x7fef24068240)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef18057780)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef18057780) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 43 (Thread 0x7fef347f8700 (LWP 579051)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee949d7800)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee949d7800, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7fef2c04b170, request=0x7fef2c0454d0, 
---Type <return> to continue, or q <return> to quit---
    response=0x7fef2cc99770, done=0x7fef2c303ac0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef2c04b170, request=0x7fef2c0454d0, 
    response=0x7fef2cc99770, done=0x7fef2c303ac0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef2c04b170, 
    request=0x7fef2c0454d0, response=0x7fef2cc99770, done=0x7fef2c303ac0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef2c0e7040)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef2c0e7040) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x00000000007950d8 in brpc::RunLastMessage::operator() (this=0x7fee949d7d80, last_msg=0x7fef2c0e7040)
    at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:139
#14 0x00000000007951b1 in std::unique_ptr<brpc::InputMessageBase, brpc::RunLastMessage>::~unique_ptr (this=0x7fee949d7d80, 
    __in_chrg=<optimized out>) at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/unique_ptr.h:239
#15 0x000000000079391f in brpc::InputMessenger::OnNewMessages (m=0x7fef7003e910)
    at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:331
#16 0x0000000000690743 in brpc::Socket::ProcessEvent (arg=0x7fef7003e910) at external/com_github_brpc_brpc/src/brpc/socket.cpp:1108
#17 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#18 0x00000000008394a1 in bthread_make_fcontext ()
#19 0x0000000000000000 in ?? ()

Thread 30 (Thread 0x7fef52ffd700 (LWP 577805)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fee90026f40) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
---Type <return> to continue, or q <return> to quit---
#4  pthread_mutex_lock (__mutex=0x7fee90026f40) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fee90026f40) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6ca0ac60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fee90026f30, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fee90026f30) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fee90026f30)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 29 (Thread 0x7fef537fe700 (LWP 577797)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6f131aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6f131aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7fef40040e20, request=0x7fef402aa140, 
    response=0x7fef402a9890, done=0x7fef400602e0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef40040e20, request=0x7fef402aa140, 
    response=0x7fef402a9890, done=0x7fef400602e0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef40040e20, 
---Type <return> to continue, or q <return> to quit---
    request=0x7fef402aa140, response=0x7fef402a9890, done=0x7fef400602e0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef140217a0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef140217a0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 28 (Thread 0x7fef53fff700 (LWP 577793)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2265b00) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2265b00) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6e929aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6e929aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x22658b0, cntl=0x7fef48948a00, request=0x7fef4871dea0, 
    response=0x7fef48085140, done=0x7fef4853ef10, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef48948a00, request=0x7fef4871dea0, 
    response=0x7fef48085140, done=0x7fef4853ef10) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef48948a00, 
    request=0x7fef4871dea0, response=0x7fef48085140, done=0x7fef4853ef10)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef14021920)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
---Type <return> to continue, or q <return> to quit---
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef14021920) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 27 (Thread 0x7fef74ff9700 (LWP 577738)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6bcfdaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee6bcfdaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2da7a70, cntl=0x7fef4c10f670, request=0x7fef4c1092c0, 
    response=0x7fef4c10da90, done=0x7fef4c08ed70, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef4c10f670, request=0x7fef4c1092c0, 
    response=0x7fef4c10da90, done=0x7fef4c08ed70) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef4c10f670, 
    request=0x7fef4c1092c0, response=0x7fef4c10da90, done=0x7fef4c08ed70)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7feea003ddf0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7feea003ddf0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---

Thread 26 (Thread 0x7fef757fa700 (LWP 577732)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef70571370) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef70571370) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef70571370) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee75494c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef70571360, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef70571360) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef70571360)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 25 (Thread 0x7fef75ffb700 (LWP 577730)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee73575aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee73575aa0, __m=...)
---Type <return> to continue, or q <return> to quit---
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2da7a70, cntl=0x7fef54080e60, request=0x7fef5402b4b0, 
    response=0x7fef551170c0, done=0x7fef54b6f3c0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef54080e60, request=0x7fef5402b4b0, 
    response=0x7fef551170c0, done=0x7fef54b6f3c0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef54080e60, 
    request=0x7fef5402b4b0, response=0x7fef551170c0, done=0x7fef54b6f3c0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef20023f40)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef20023f40) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 24 (Thread 0x7fef767fc700 (LWP 577724)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x21c0de0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3fbfbaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef3fbfbaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x21c0b90, cntl=0x7fef6001f8c0, request=0x7fef6011e620, 
    response=0x7fef604461f0, done=0x7fef600280e0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef6001f8c0, request=0x7fef6011e620, 
---Type <return> to continue, or q <return> to quit---
    response=0x7fef604461f0, done=0x7fef600280e0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef6001f8c0, 
    request=0x7fef6011e620, response=0x7fef604461f0, done=0x7fef600280e0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef5805dd30)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef5805dd30) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 23 (Thread 0x7fef76ffd700 (LWP 577716)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef502deaa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef502deaa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2da7a70, cntl=0x7fef5cd7f910, request=0x7fef5cacb9e0, 
    response=0x7fef5c08f760, done=0x7fef5c037e30, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef5cd7f910, request=0x7fef5cacb9e0, 
    response=0x7fef5c08f760, done=0x7fef5c037e30) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef5cd7f910, 
    request=0x7fef5cacb9e0, response=0x7fef5c08f760, done=0x7fef5c037e30)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
---Type <return> to continue, or q <return> to quit---
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef5c05f230)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef5c05f230) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 22 (Thread 0x7fef777fe700 (LWP 577709)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef4c2da140) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef4c2da140) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef4c2da140) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee890d7c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef4c2da130, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef4c2da130) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef4c2da130)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 21 (Thread 0x7fef77fff700 (LWP 577697)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef20329510) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef20329510) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef20329510) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7feef07f8c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef20329500, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef20329500) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef20329500)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 20 (Thread 0x7fef94ff1700 (LWP 577613)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2da7cc0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2da7cc0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3eeeee70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef3eeeee70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e212c in braft::NodeImpl::handle_election_timeout (this=0x2da7a70) at external/com_github_brpc_braft/src/braft/node.cpp:1027
#9  0x00000000005efacc in braft::ElectionTimer::run (this=0x2da7f00) at external/com_github_brpc_braft/src/braft/node.cpp:3133
#10 0x000000000061d3cf in braft::RepeatedTimerTask::on_timedout (this=0x2da7f00)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:63
---Type <return> to continue, or q <return> to quit---
#11 0x000000000061d678 in braft::RepeatedTimerTask::run_on_timedout_in_new_thread (arg=0x2da7f00)
    at external/com_github_brpc_braft/src/braft/repeated_timer_task.cpp:111
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()

Thread 19 (Thread 0x7fef957f2700 (LWP 577608)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feed4296b20) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7feed4296b20) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feed4296b20) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee948d6c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7feed4296b10, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7feed4296b10) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feed4296b10)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 18 (Thread 0x7fef95ff3700 (LWP 577600)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7feee0865090) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
---Type <return> to continue, or q <return> to quit---
#4  pthread_mutex_lock (__mutex=0x7feee0865090) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7feee0865090) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef3e5e5c60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7feee0865080, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7feee0865080) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7feee0865080)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 17 (Thread 0x7fef967f4700 (LWP 577580)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x2ca61f0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x2ca61f0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee75393aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee75393aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x2ca5fa0, cntl=0x7fef780be3f0, request=0x7fef7803f8c0, 
    response=0x7fef780595f0, done=0x7fef78107390, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef780be3f0, request=0x7fef7803f8c0, 
    response=0x7fef780595f0, done=0x7fef78107390) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef780be3f0, 
---Type <return> to continue, or q <return> to quit---
    request=0x7fef7803f8c0, response=0x7fef780595f0, done=0x7fef78107390)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef18056480)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef18056480) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 16 (Thread 0x7fef96ff5700 (LWP 577572)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef8a125038) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef8a125038) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef8a125038) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fef517f3d70)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fef517f3d70, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x0000000000666285 in braft::RemoteFileCopier::Session::on_rpc_returned (this=0x7fef8a125030)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.cpp:247
#9  0x0000000000667676 in braft::RemoteFileCopier::Session::Closure::Run (this=0x7fef8a1250d0)
    at external/com_github_brpc_braft/src/braft/remote_file_copier.h:67
#10 0x0000000000675a48 in brpc::Controller::EndRPC (this=0x7fef8a1250e0, info=...) at external/com_github_brpc_brpc/src/brpc/controller.cpp:890
#11 0x0000000000674ec2 in brpc::Controller::RunEndRPC (arg=0x7fef8a1250e0) at external/com_github_brpc_brpc/src/brpc/controller.cpp:679
#12 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#13 0x00000000008394a1 in bthread_make_fcontext ()
#14 0x0000000000000000 in ?? ()
---Type <return> to continue, or q <return> to quit---

Thread 15 (Thread 0x7fef977f6700 (LWP 577560)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x4555240) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x4555240) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee891d8aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee891d8aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x4554ff0, cntl=0x7fef8008ce50, request=0x7fef80b55090, 
    response=0x7fef80223ae0, done=0x7fef80050df0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef8008ce50, request=0x7fef80b55090, 
    response=0x7fef80223ae0, done=0x7fef80050df0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef8008ce50, 
    request=0x7fef80b55090, response=0x7fef80223ae0, done=0x7fef80050df0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef800635e0)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef800635e0) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 14 (Thread 0x7fef97ff7700 (LWP 577553)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x7fef7c922630) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x7fef7c922630) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x7fef7c922630) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee6cc0cc60)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x000000000062caf7 in braft::LocalSnapshotCopier::copy_file (this=0x7fef7c922620, filename=...)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:989
#8  0x000000000062aa66 in braft::LocalSnapshotCopier::copy (this=0x7fef7c922620) at external/com_github_brpc_braft/src/braft/snapshot.cpp:759
#9  0x000000000062a96c in braft::LocalSnapshotCopier::start_copy (arg=0x7fef7c922620)
    at external/com_github_brpc_braft/src/braft/snapshot.cpp:742
#10 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#11 0x00000000008394a1 in bthread_make_fcontext ()
#12 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7fef987f8700 (LWP 577520)):
#0  0x00007fefa8f344ed in __lll_lock_wait () from /usr/lib64/libpthread.so.0
#1  0x00007fefa8f2fdcb in _L_lock_883 () from /usr/lib64/libpthread.so.0
#2  0x00007fefa8f2fc98 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#3  0x0000000000824a93 in pthread_mutex_lock_impl (mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:523
#4  pthread_mutex_lock (__mutex=0x21c0de0) at external/com_github_brpc_brpc/src/bthread/mutex.cpp:809
#5  0x0000000000451f46 in butil::Mutex::lock (this=0x21c0de0) at external/com_github_brpc_brpc/src/butil/synchronization/lock.h:55
#6  0x00000000005da9d5 in std::unique_lock<butil::Mutex>::lock (this=0x7fee969f7aa0)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:267
#7  0x00000000005da546 in std::unique_lock<butil::Mutex>::unique_lock (this=0x7fee969f7aa0, __m=...)
    at /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/std_mutex.h:197
#8  0x00000000005e8cc5 in braft::NodeImpl::handle_append_entries_request (this=0x21c0b90, cntl=0x7fef892b14a0, request=0x7fef8a7ffea0, 
    response=0x7fef883b6180, done=0x7fef880444f0, from_append_entries_cache=false) at external/com_github_brpc_braft/src/braft/node.cpp:2088
#9  0x000000000061f770 in braft::RaftServiceImpl::append_entries (this=0x7ffc61124340, cntl_base=0x7fef892b14a0, request=0x7fef8a7ffea0, 
---Type <return> to continue, or q <return> to quit---
    response=0x7fef883b6180, done=0x7fef880444f0) at external/com_github_brpc_braft/src/braft/raft_service.cpp:113
#10 0x000000000093f3be in braft::RaftService::CallMethod (this=0x7ffc61124340, method=0x7fef54029b40, controller=0x7fef892b14a0, 
    request=0x7fef8a7ffea0, response=0x7fef883b6180, done=0x7fef880444f0)
    at bazel-out/k8-dbg/genfiles/external/com_github_brpc_braft/src/braft/raft.pb.cc:5017
#11 0x0000000000782521 in brpc::policy::ProcessRpcRequest (msg_base=0x7fef7c070e00)
    at external/com_github_brpc_brpc/src/brpc/policy/baidu_rpc_protocol.cpp:497
#12 0x0000000000792bb6 in brpc::ProcessInputMessage (void_arg=0x7fef7c070e00) at external/com_github_brpc_brpc/src/brpc/input_messenger.cpp:133
#13 0x000000000081340e in bthread::TaskGroup::task_runner (skip_remained=0) at external/com_github_brpc_brpc/src/bthread/task_group.cpp:293
#14 0x00000000008394a1 in bthread_make_fcontext ()
#15 0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7fef98ff9700 (LWP 577518)):
#0  0x00007fefa73921c9 in syscall () from /usr/lib64/libc.so.6
#1  0x000000000080ef91 in bthread::futex_wait_private (addr1=0x2092f38, expected=25825, timeout=0x0)
    at external/com_github_brpc_brpc/src/bthread/sys_futex.h:37
#2  0x000000000080e851 in bthread::TimerThread::run (this=0x2092ef0) at external/com_github_brpc_brpc/src/bthread/timer_thread.cpp:435
#3  0x000000000080d334 in bthread::TimerThread::run_this (arg=0x2092ef0) at external/com_github_brpc_brpc/src/bthread/timer_thread.cpp:117
#4  0x00007fefa8f2ddd5 in start_thread () from /usr/lib64/libpthread.so.0
#5  0x00007fefa7397ead in clone () from /usr/lib64/libc.so.6

Thread 1 (Thread 0x7fefa2fd0700 (LWP 577303)):
#0  0x00007fefa735ee2d in nanosleep () from /usr/lib64/libc.so.6
#1  0x00007fefa738f704 in usleep () from /usr/lib64/libc.so.6
#2  0x0000000000854398 in bvar::detail::SamplerCollector::run (this=0x1e205b0) at external/com_github_brpc_brpc/src/bvar/detail/sampler.cpp:130
#3  0x0000000000854938 in bvar::detail::SamplerCollector::sampling_thread (arg=0x1e205b0)
    at external/com_github_brpc_brpc/src/bvar/detail/sampler.cpp:81
#4  0x00007fefa8f2ddd5 in start_thread () from /usr/lib64/libpthread.so.0
#5  0x00007fefa7397ead in clone () from /usr/lib64/libc.so.6

通过gdb分析发现,确实存在死锁的现象: 现象(1)所有卡在braft::LocalSnapshotCopier::copy_file的thread,都在等LocalSnapshotCopier的_mutex,但是gdb发现这个pthread已经持有了这把锁,所以再次进入的时候会死锁,例如上面堆栈的Thead 14、18、21、22、69等 现象(2)所有卡在braft::RemoteFileCopier::Session::on_rpc_returned的thread,都在等RemoteFileCopier的_mutex,但是gdb显示,这把锁都被卡在braft::LocalSnapshotCopier::copy_file的线程持有了,类似的线程有Thread 16,它需要的锁已经被Thread 69持有,而Thread 69又死锁了,也就是卡在braft::LocalSnapshotCopier::copy_file

这里根本的原因就是现象(1)死锁了,导致一连串的死锁,理论上在install snapshot的时候怎么会拿到LocalSnapshotCopier的_mutex之后又重新尝试拿这把锁?这跟bthread调度有关吗?感觉像是bthread拿到了_mutex,又切换出去,然后切换进来的新bthread,又去拿这把_mutex,从而造成了死锁。

不知道你们有遇到类似的问题没?附上部分日志:

I0603 11:26:01.204864 579067 node.cpp:2354] node 4294969292:10.182.26.0:8216:0 received InstallSnapshotRequest last_included_log_index=68275306 last_include_log_term=40 from 10.182.26.1:8217:0 when last_log_id=(index=67858560,term=23)
I0603 11:28:00.074563 577580 node.cpp:1907] node 4294969292:10.182.26.0:8216:0 received PreVote from 10.182.26.2:8206:0 in term 41 current_term 40 granted 1
I0603 11:28:00.075150 579082 node.cpp:1946] node 4294969292:10.182.26.0:8216:0 received RequestVote from 10.182.26.2:8206:0 in term 41 current_term 40
W0603 11:28:00.075352 579082 snapshot.cpp:763] Fail to copy, error_code 125 error_msg Operation canceled writer path /data/chunkserver16/copysets/4294969292/raft_snapshot/temp
I0603 11:28:00.075368 579082 snapshot.cpp:516] Deleting /data/chunkserver16/copysets/4294969292/raft_snapshot/temp
I0603 11:28:00.075369 579064 snapshot_executor.cpp:607] node 4294969292:10.182.26.0:8216:0 Trying to cancel downloading snapshot : group_id: "4294969292" server_id: "10.182.26.1:8217:0" peer_id: "10.182.26.0:8216:0" term: 40 meta { last_included_index: 68275306 last_included_term: 40 peers: "10.182.26.0:8216:0" peers: "10.182.26.1:8217:0" peers: "10.182.26.2:8206:0" } uri: "remote://10.182.26.1:8217/-8872854137638749350"
I0603 11:28:00.075953 579064 raft_meta.cpp:128] save raft meta, path data/chunkserver16/copysets/4294969292/raft_meta term 41 votedfor 0.0.0.0:0:0 time: 549
I0603 11:28:00.076050 579064 snapshot_executor.cpp:607] node 4294969292:10.182.26.0:8216:0 Trying to cancel downloading snapshot : group_id: "4294969292" server_id: "10.182.26.1:8217:0" peer_id: "10.182.26.0:8216:0" term: 40 meta { last_included_index: 68275306 last_included_term: 40 peers: "10.182.26.0:8216:0" peers: "10.182.26.1:8217:0" peers: "10.182.26.2:8206:0" } uri: "remote://10.182.26.1:8217/-8872854137638749350"
I0603 11:28:00.076442 579064 raft_meta.cpp:128] save raft meta, path data/chunkserver16/copysets/4294969292/raft_meta term 41 votedfor 10.182.26.2:8206:0 time: 361
I0603 11:28:00.076560 577716 snapshot_executor.cpp:607] node 4294969292:10.182.26.0:8216:0 Trying to cancel downloading snapshot : group_id: "4294969292" server_id: "10.182.26.1:8217:0" peer_id: "10.182.26.0:8216:0" term: 40 meta { last_included_index: 68275306 last_included_term: 40 peers: "10.182.26.0:8216:0" peers: "10.182.26.1:8217:0" peers: "10.182.26.2:8206:0" } uri: "remote://10.182.26.1:8217/-8872854137638749350"
W0603 11:28:00.076596 577716 node.cpp:2192] node 4294969292:10.182.26.0:8216:0 reject term_unmatched AppendEntries from 10.182.26.2:8206:0 in term 41 prev_log_index 68275310 prev_log_term 40 local_prev_log_term 0 last_log_index 67858560 entries_size 0 from_append_entries_cache: 0
I0603 11:28:00.080991 577580 node.cpp:2354] node 4294969292:10.182.26.0:8216:0 received InstallSnapshotRequest last_included_log_index=68275306 last_include_log_term=40 from 10.182.26.2:8206:0 when last_log_id=(index=67858560,term=23)
W0603 11:28:00.081017 577580 snapshot_executor.cpp:579] Register failed: interrupted by retry installing request.
W0603 11:28:00.081068 577580 snapshot_executor.cpp:414] node 4294969292:10.182.26.0:8216:0 fail to register_downloading_snapshot
W0603 11:28:00.092551 579074 baidu_rpc_protocol.cpp:255] Fail to write into Socket{id=8589938305 fd=15013 addr=10.182.26.2:60462:8216} (0x7fef880e1630): Unknown error 1014 [1014]
I0603 11:28:00.237361 577600 node.cpp:2354] node 4294969292:10.182.26.0:8216:0 received InstallSnapshotRequest last_included_log_index=68275306 last_include_log_term=40 from 10.182.26.2:8206:0 when last_log_id=(index=67858560,term=23)
demiaowu commented 5 years ago

更新一下我们的分析进度:

(1)主要原因: 根据上面core dump和日志,我们发现死锁和新原因是Follower Abraft::LocalSnapshotCopier::copy_filesession->join();唤醒之后,如下代码调lck.lock(),发现此lck已经被当前pthread lock 过了,并且没有unlock,那么造成下面调lck.lock()拿不到锁,这样就死锁了。相当于一个bthread拿到了一把锁,没有释放又去拿这把锁,从而造成死锁,自己把自己给锁死了。

void LocalSnapshotCopier::copy_file(const std::string& filename) {
    ......
    lck.unlock();
    session->join();
    lck.lock();
    .......

这个bthread的调度看上去几乎不能避免这个问题

(2)死锁场景复现分析 结合coredump 和日志,我们给出一种死锁场景复现分析: (2.1)Follower A下载快照,负责下载快照的bthread等待某个下载文件完成的之后切出去 第1步:I0603 11:26:01.204864 579067 node.cpp:2354] node 4294969292:10.182.26.0:8216:0 received InstallSnapshotRequest last_included_log_index=68275306 last_include_log_term=40 from 10.182.26.1:8217:0 when last_log_id=(index=67858560,term=23) 下载快照,进入copy_file下载某个文件,session->join(); 这个bthread切出去,切出去之后,已经将锁释放,这个时候,没有拿到任何的lock

(2.2)Follower A收到更大term的RequestVote,然后step down,执行打断interrupt_downloading_snapshot的逻辑,日志如下: I0603 11:28:00.075150 579082 node.cpp:1946] node 4294969292:10.182.26.0:8216:0 received RequestVote from 10.182.26.2:8206:0 in term 41 current_term 40 第1步:NodeImpl::handle_request_vote_request处理投票请求,拿到NodeImpl 的mutex 第2步:NodeImpl::step_down,执行打断当前正在下载的snapshot _snapshot_executor->interrupt_downloading_snapshot(term) 第3步:interrupt_downloading_snapshot拿到SnapshotExecutor的mutex,执行_cur_copier->cancel() 第4步:LocalSnapshotCopier::cancel拿到 LocalSnapshotCopier的mutex,调用_cur_session->cancel() 第5步:Session::cancel拿到 RemoteFileCopier的mutex,然后执行rpc::StartCancel(_rpc_call);取消session那边下载文件的rpc,通过ECANCELED错误和on_finished();,通过_finish_event.signal();唤醒(2.1)的session.join()

问题来,如果第5步,拿到了LocalSnapshotCopier和RemoteFileCopier等的mutex之后,切出去,并且(2.2)和(2.1)运行在同一个worker pthread空间上,那么(2.2)的第5步切换出去,(2.1)切换进来掉lck.lock(),那么就死锁了。

实际上,从上面的堆栈来看,on_rpc_returned、'copy_file'、handle_append_entries_requesthandle_election_timeout就都会拿不到锁,从而最后将整个bthread的theadpool都锁死掉了

PFZheng commented 5 years ago

我们分析下这个case

PFZheng commented 5 years ago

分析得比较详细。看起来是这样的,按照bthread的调度,signal之后会唤醒join的bthread前台继续处理,然后自己成为一个background bthread,等待被重新调度。这时候,如果没有可用线程的话,会导致这个background bthread没有机会被调用到,从而lock没有释放。 这个问题在全用 bthread mutex 的时候几率会比较小,bthread mutex冲突的时候会自己排队。 单纯针对这个问题,貌似 signal 的动作需要在异步执行来避免这个问题。其它有 singnal的地方也需要排查下

PFZheng commented 5 years ago

这里整个流程上嵌套的锁有些多😓

demiaowu commented 5 years ago

其实也有可能就在brpc::StartCancel(_rpc_call);里面就切出去了,因为StartCancel里面也有bthread_start_urgent,这里也会导致切出去

void RemoteFileCopier::Session::cancel() {
    BAIDU_SCOPED_LOCK(_mutex);
    if (_finished) {
        return; 
    }
    brpc::StartCancel(_rpc_call);
    if (bthread_timer_del(_timer) == 0) {
        // Release reference of the timer task
        Release();
    }
    if (_st.ok()) {
        _st.set_error(ECANCELED, "%s", berror(ECANCELED));
    }
    on_finished();
}
demiaowu commented 5 years ago

嗯嗯,异步执行可以解决这个问题。不过感觉很多地方都会有这样的坑,特别在并发压力大的时候,还是有可能又类似上面的死锁,或者https://github.com/apache/incubator-brpc/issues/473 上面死锁的问题出现。

不知道你们有没有使用手册之类的,明确的list,告诉哪些操作容易造成死锁供我们参考下~

PFZheng commented 5 years ago

其实也有可能就在brpc::StartCancel(_rpc_call);里面就切出去了,因为StartCancel里面也有bthread_start_urgent,这里也会导致切出去

void RemoteFileCopier::Session::cancel() {
    BAIDU_SCOPED_LOCK(_mutex);
    if (_finished) {
        return; 
    }
    brpc::StartCancel(_rpc_call);
    if (bthread_timer_del(_timer) == 0) {
        // Release reference of the timer task
        Release();
    }
    if (_st.ok()) {
        _st.set_error(ECANCELED, "%s", berror(ECANCELED));
    }
    on_finished();
}

嗯,对。这个彻底fix有点儿麻烦,依赖了bthread的调度。建议评估下,是不是直接先把 mutex 切换 bthread,百度内部的业务其实一直用的是 bthread mutex,这个的问题在于死锁的时候定位比较麻烦,所以开源版本默认用了 pthread mutex

demiaowu commented 5 years ago

主要之前看 https://github.com/brpc/braft/issues/69 讨论,后面评估下考虑将pthread mutex替换成bthread mutex测测~

chenzhangyi commented 5 years ago

StartCancel可以考虑移到锁外面,另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex.

demiaowu commented 5 years ago

(1) 你们线上业务braft使用的是pthread mutex还是bthread mutex ? (2)另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex,是不推荐braft使用bthread_mutex的意思吗?因为使用bthread mutex有其他的隐患吗 ?

demiaowu commented 5 years ago

StartCancel可以考虑移到锁外面,另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex.

仅仅移到RemoteFileCopier的mutex外面还不够,需要移到LocalSnapshotCopier的mutex外面才行,因为现在死锁的地方就是在LocalSnapshotCopier的mutex上面

PFZheng commented 5 years ago

StartCancel可以考虑移到锁外面,另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex.

其实其它类似的地方也有这个问题,要这样修改的话,需要整体排查一遍

demiaowu commented 5 years ago

StartCancel可以考虑移到锁外面,另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex.

其实其它类似的地方也有这个问题,要这样修改的话,需要整体排查一遍

(1)signal 的动作需要在异步执行来避免这个问题,这样做有内存的管理的问题,当前Session放在scoped_refptr中的,一旦异步,那么处理的时候,Session的内存可能被释放掉了 (2)StartCancel可以考虑移到外面去,同时on_finished的里面的signal也需要异步化处理

PFZheng commented 5 years ago

(1) 你们线上业务braft使用的是pthread mutex还是bthread mutex ? (2)另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex,是不推荐braft使用bthread_mutex的意思吗?因为使用bthread mutex有其他的隐患吗 ?

1) 线上业务用的是 bthread mutex; 2) @chenzhangyi 的意思应该是业务自己应该最好不要去直接去使用bthread mutex吧。pthread bthread 混用的时候比较容易失控,类似这里的这个 case

demiaowu commented 5 years ago

(1) 你们线上业务braft使用的是pthread mutex还是bthread mutex ? (2)另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex,是不推荐braft使用bthread_mutex的意思吗?因为使用bthread mutex有其他的隐患吗 ?

  1. 线上业务用的是 bthread mutex;
  2. @chenzhangyi 的意思应该是业务自己应该最好不要去直接去使用bthread mutex吧。pthread bthread 混用的时候比较容易失控,类似这里的这个 case
  1. 这个问题在全用 bthread mutex 的时候几率会比较小,使用bthread mutex,上面那段有问题的逻辑还是存在,只是不会造成全面的死锁
  2. 也就是说你们线上都没有pthread和bthread混用。但是就目前来看,业务使用pthread,raft里面使用bthread mutex,好像也没啥问题,看了下bthread mutex的代码,bthread mutex支持业务pthread直接调用。
PFZheng commented 5 years ago

(1) 你们线上业务braft使用的是pthread mutex还是bthread mutex ? (2)另外不建议在raft的用户接口牵涉到的实现里面直接使用bthread_mutex,是不推荐braft使用bthread_mutex的意思吗?因为使用bthread mutex有其他的隐患吗 ?

  1. 线上业务用的是 bthread mutex;
  2. @chenzhangyi 的意思应该是业务自己应该最好不要去直接去使用bthread mutex吧。pthread bthread 混用的时候比较容易失控,类似这里的这个 case
  1. 这个问题在全用 bthread mutex 的时候几率会比较小,使用bthread mutex,上面那段有问题的逻辑还是存在,只是不会造成全面的死锁
  2. 也就是说你们线上都没有pthread和bthread混用。但是就目前来看,业务使用pthread,raft里面使用bthread mutex,好像也没啥问题,看了下bthread mutex的代码,bthread mutex支持业务pthread直接调用。
  1. pthread rw lock 里调用 bthread 大概率会出问题,glibc 里有一些同一线程重入的检查,bthread context switch 发生后,如果两次加锁操作恰好在同一 pthread 线程里去执行,会导致该检查失败,误判死锁;
  2. 混用的时候,除了 bthread mutex 本身冲突导致的 context switch,如果不出现其它的 bthread context swtich(譬如上面的这个case),是没有问题的。
cl079074282 commented 3 years ago

分析得比较详细。看起来是这样的,按照bthread的调度,signal之后会唤醒join的bthread前台继续处理,然后自己成为一个background bthread,等待被重新调度。这时候,如果没有可用线程的话,会导致这个background bthread没有机会被调用到,从而lock没有释放。 这个问题在全用 bthread mutex 的时候几率会比较小,bthread mutex冲突的时候会自己排队。 单纯针对这个问题,貌似 signal 的动作需要在异步执行来避免这个问题。其它有 singnal的地方也需要排查下

代码中造成bthread 切换而又不能再次被调度时就会大概率死锁

helloworld0xff commented 3 months ago

用bthread mutex或者pthread mutex都会出现死锁,改成pthread_create貌似解决了