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

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

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

KUDU-3599 more robust way of updating tablet copy metrics

This patch addresses ThreadSanitizer warnings on accessing recently
introduced RemoteTabletCopySourceSession::start_time_ field.  That's
done by using already existing field TabletCopySourceSession::init_once_
of the thread-safe KuduOnceDynamic type to check if the 'start_time_'
has already been initialized.

This is a follow-up to d370e0e4511508790c065340a52242ee09ecfea3.

Change-Id: Id78d0df426fcbc5711624eb94b06babd8689d2ba
Reviewed-on: http://gerrit.cloudera.org:8080/21658
Reviewed-by: Yingchun Lai <laiyingc...@apache.org>
Reviewed-by: KeDeng <kdeng...@gmail.com>
Tested-by: Alexey Serbin <ale...@apache.org>


> tablet_copy_service-test is flaky in TSAN builds
> ------------------------------------------------
>
>                 Key: KUDU-3599
>                 URL: https://issues.apache.org/jira/browse/KUDU-3599
>             Project: Kudu
>          Issue Type: Sub-task
>            Reporter: Mahesh Reddy
>            Priority: Major
>         Attachments: tablet_copy_service-test.txt.gz
>
>
> TSAN reports data races. The entire trace is attached. The following is a 
> snippet of the trace:
> {code:java}
> WARNING: ThreadSanitizer: data race (pid=20262)
>   Read of size 8 at 0x7b580003adb8 by thread T58 (mutexes: write 
> M867641427390348624):
>     #0 kudu::MonoTime::Initialized() const 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/util/monotime.cc:202:10
>  (libkudu_util.so+0x3d7b79)
>     #1 kudu::tserver::RemoteTabletCopySourceSession::UpdateTabletMetrics() 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/tserver/tablet_copy_source_session.cc:518:7
>  (libtserver.so+0x249407)
>     #2 
> kudu::tserver::TabletCopyServiceImpl::DoEndTabletCopySessionUnlocked(std::_1::basic_string<char,
>  std::1::char_traits<char>, std::_1::allocator<char> > const&, 
> kudu::tserver::TabletCopyErrorPB_Code*) 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/tserver/tablet_copy_service.cc:431:12
>  (libtserver.so+0x23b567)
>     #3 kudu::tserver::TabletCopyServiceImpl::EndExpiredSessions() 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/tserver/tablet_copy_service.cc:461:7
>  (libtserver.so+0x23ca63)
>     #4 
> kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0::operator()() const 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/tserver/tablet_copy_service.cc:115:3
>  (libtserver.so+0x23dd01)
>     #5 
> decltype(std::_1::forward<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0&>(fp)()) 
> std::1::_invoke<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  
> kudu::tserver::TabletReplicaLookupIf*)::$_0&>(kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0&) 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/type_traits:3899:1
>  (libtserver.so+0x23dcb9)
>     #6 void 
> std::_1::invoke_void_return_wrapper<void>::call<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  
> kudu::tserver::TabletReplicaLookupIf*)::$_0&>(kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0&) 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/_functional_base:348:9
>  (libtserver.so+0x23dc49)
>     #7 
> std::_1::function::alloc_func<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0, 
> std::_1::allocator<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0>, void ()>::operator()() 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/functional:1557:16
>  (libtserver.so+0x23dc11)
>     #8 
> std::_1::function::func<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0, 
> std::_1::allocator<kudu::tserver::TabletCopyServiceImpl::TabletCopyServiceImpl(kudu::server::ServerBase*,
>  kudu::tserver::TabletReplicaLookupIf*)::$_0>, void ()>::operator()() 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/functional:1731:12
>  (libtserver.so+0x23cf0d)
>     #9 std::_1::function::_value_func<void ()>::operator()() const 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/functional:1884:16
>  (libtserver_test_util.so+0x601a4)
>     #10 std::__1::function<void ()>::operator()() const 
> /home/jenkins-slave/workspace/build_and_test@2/thirdparty/installed/tsan/include/c++/v1/functional:2556:12
>  (libtserver_test_util.so+0x5ffd9)
>     #11 kudu::Thread::SuperviseThread(void*) 
> /home/jenkins-slave/workspace/build_and_test@2/src/kudu/util/thread.cc:694:3 
> (libkudu_util.so+0x449546){code}



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

Reply via email to