Open as51340 opened 8 months ago
From what you provided, it seems there is a race between srv_to_join_.reset()
and peer::lock_
. However, that is not possible as peer::handle_rpc_result
has myself
not to make the reference counter of the shared pointer become 0. I haven't seen TSAN alert during the normal server add/removal process.
Thanks for the reply!
We are using NuRaft v2.1.0 Yes, TSAN alerts on every run.
Can you instruct me on how to get logs?
I tried the same code with the same NuRaft version, still didn't get TSAN alert.
Could you share your build environment? Such as OS version, compiler version, etc. Also please share Raft parameters (heartbeat, election lower/upper timeout, ...).
I found data race using TSAN in my code. The issue seems to be in peer.
Relevant code that is using NuRaft here is related to adding servers, we do: