[ 
https://issues.apache.org/jira/browse/KUDU-3651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935687#comment-17935687
 ] 

ASF subversion and git services commented on KUDU-3651:
-------------------------------------------------------

Commit e2620980425571f5a941bfa6fe73326a9885a73f in kudu's branch 
refs/heads/master from Alexey Serbin
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=e26209804 ]

Revert "KUDU-3651 fix race condition in TabletReplica::Stop()"

This reverts commit b75641714e469da060dcd8f2447b7c7b984bce6e.

This patch was pushed out-of-the-order (should be preceded by 
https://gerrit.cloudera.org/#/c/22614/) and now the build is broken. 
Let's reverting this patch and submit the patches in proper order.

Change-Id: Id324c47aec0812956111ca964e0590ee6073f20b
Reviewed-on: http://gerrit.cloudera.org:8080/22628
Reviewed-by: Abhishek Chennaka <achenn...@cloudera.com>
Tested-by: Alexey Serbin <ale...@apache.org>


> Race condition in TabletReplica::Stop()
> ---------------------------------------
>
>                 Key: KUDU-3651
>                 URL: https://issues.apache.org/jira/browse/KUDU-3651
>             Project: Kudu
>          Issue Type: Bug
>          Components: master, tablet, tserver
>    Affects Versions: 0.7.0, 0.7.1, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 1.0.0, 1.0.1, 
> 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.7.1, 1.9.0, 
> 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.11.1, 1.13.0, 1.14.0, 1.15.0, 1.16.0, 
> 1.17.0, 1.17.1
>            Reporter: Alexey Serbin
>            Priority: Major
>         Attachments: txn_participant-test.txt.xz
>
>
> There is a race condition in {{TabletReplica::Stop()}}: new operations might 
> be accepted by a tablet replica right after calling 
> {{OpTracker::WaitForAllToFinish()}} and before the replica's prepare pool 
> token is shut down.
> The race manifests itself at least as a TSAN warning in various scenarios of 
> {{txn_participant-test}}.  See the attached log for a report on one 
> particular instance of the race.  One excerpt is below:
> {noformat}
>     WARNING: ThreadSanitizer: data race (pid=4116)
>       Write of size 8 at 0x7b4400027688 by main thread:
>         #0 std::__1::__vector_base<kudu::MemTracker*, 
> std::__1::allocator<kudu::MemTracker*> 
> >::__destruct_at_end(kudu::MemTracker**)
>         ...
>         #3 std::__1::vector<kudu::MemTracker*, 
> std::__1::allocator<kudu::MemTracker*> >::~vector()
>         #4 kudu::MemTracker::~MemTracker() mem_tracker.cc:83:1
>         ...
>         #9 kudu::tablet::OpTracker::~OpTracker()
>         #10 kudu::tablet::TabletReplica::~TabletReplica()
>         ...
>         #16 
> scoped_refptr<kudu::tablet::TabletReplica>::reset(kudu::tablet::TabletReplica*)
>         #17 kudu::tablet::TabletReplicaTestBase::RestartReplica(bool)
>     
>       Previous read of size 8 at 0x7b4400027688 by thread T20 (mutexes: write 
> M1047222376632167904):
>         #0 std::__1::vector<kudu::MemTracker*, 
> std::__1::allocator<kudu::MemTracker*> >::end()
>         #1 kudu::MemTracker::Release(long)
>         #2 kudu::tablet::OpTracker::Release(kudu::tablet::OpDriver*)
>         #3 kudu::tablet::OpDriver::Finalize()
>         #4 kudu::tablet::OpDriver::ApplyTask()
>         #5 kudu::tablet::OpDriver::ApplyAsync()::$_2::operator()()
>         ...
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to