kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject kudu git commit: process_memory::HardLimit() should init limits
Date Fri, 28 Jul 2017 19:58:40 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 0e41d4cce -> 230ed20d5


process_memory::HardLimit() should init limits

This fixes a TSAN race which showed up on the flaky dashboard:

LinkedListTest.TestLoadAndVerify: WARNING: ThreadSanitizer: data race (pid=25635)  Write of
size 8 at 0x7f54913d69a8 by thread T126 (mutexes: write M1231):
    #0 kudu::process_memory::(anonymous namespace)::DoInitLimits() /data/jenkins-workspace/kudu-workspace/src/kudu/util/process_memory.cc:166:16
(libkudu_util.so+0x1a7279)
    #1 GoogleOnceInternalInit(int*, void (*)(), void (*)(void*), void*) /data/jenkins-workspace/kudu-workspace/src/kudu/gutil/once.cc:38:7
(libgutil.so+0x35507)
    #2 GoogleOnceInit(GoogleOnceType*, void (*)()) /data/jenkins-workspace/kudu-workspace/src/kudu/gutil/once.h:55:5
(libtserver.so+0xc5773)
    #3 kudu::process_memory::(anonymous namespace)::InitLimits() /data/jenkins-workspace/kudu-workspace/src/kudu/util/process_memory.cc:184:3
(libkudu_util.so+0x1a7071)
    #4 kudu::process_memory::UnderMemoryPressure(double*) /data/jenkins-workspace/kudu-workspace/src/kudu/util/process_memory.cc:221:3
(libkudu_util.so+0x1a6faa)
    #5 _ZNSt3__18__invokeIRPFbPdEJS1_EEEDTclclsr3std3__1E7forwardIT_Efp_Espclsr3std3__1E7forwardIT0_Efp0_EEEOS5_DpOS6_
/data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/c++/v1/type_traits:4301:1
(libkudu_util.so+0x16ac0d)
    #6 _ZNSt3__128__invoke_void_return_wrapperIbE6__callIJRPFbPdES3_EEEbDpOT_ /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/c++/v1/__functional_base:328
(libkudu_util.so+0x16ac0d)
    #7 std::__1::__function::__func<bool (*)(double*), std::__1::allocator<bool (*)(double*)>,
bool ()(double*)>::operator()(double*&&) /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/c++/v1/functional:1552:12
(libkudu_util.so+0x16ab14)
    #8 std::__1::function<bool ()(double*)>::operator()(double*) const /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/c++/v1/functional:1914:12
(libkudu_util.so+0x168cad)
    #9 kudu::MaintenanceManager::FindBestOp() /data/jenkins-workspace/kudu-workspace/src/kudu/util/maintenance_manager.cc:383:7
(libkudu_util.so+0x165a56)
    #10 kudu::MaintenanceManager::RunSchedulerThread() /data/jenkins-workspace/kudu-workspace/src/kudu/util/maintenance_manager.cc:245:25
(libkudu_util.so+0x164240)
    #11 boost::_mfi::mf0<void, kudu::MaintenanceManager>::operator()(kudu::MaintenanceManager*)
const /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/bind/mem_fn_template.hpp:49:29
(libkudu_util.so+0x16ba16)
    #12 void boost::_bi::list1<boost::_bi::value<kudu::MaintenanceManager*> >::operator()<boost::_mfi::mf0<void,
kudu::MaintenanceManager>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void,
kudu::MaintenanceManager>&, boost::_bi::list0&, int) /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/bind/bind.hpp:259:9
(libkudu_util.so+0x16b96a)
    #13 boost::_bi::bind_t<void, boost::_mfi::mf0<void, kudu::MaintenanceManager>,
boost::_bi::list1<boost::_bi::value<kudu::MaintenanceManager*> > >::operator()()
/data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/bind/bind.hpp:1222:16
(libkudu_util.so+0x16b8f3)
    #14 boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,
boost::_mfi::mf0<void, kudu::MaintenanceManager>, boost::_bi::list1<boost::_bi::value<kudu::MaintenanceManager*>
> >, void>::invoke(boost::detail::function::function_buffer&) /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/function/function_template.hpp:159:11
(libkudu_util.so+0x16b6f9)
    #15 boost::function0<void>::operator()() const /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/function/function_template.hpp:770:14
(libkrpc.so+0xb01c1)
    #16 kudu::Thread::SuperviseThread(void*) /data/jenkins-workspace/kudu-workspace/src/kudu/util/thread.cc:591:3
(libkudu_util.so+0x1bf37e)

  Previous read of size 8 at 0x7f54913d69a8 by thread T124:
    #0 kudu::process_memory::HardLimit() /data/jenkins-workspace/kudu-workspace/src/kudu/util/process_memory.cc:217:10
(libkudu_util.so+0x1a6f6a)
    #1 kudu::MemTrackersHandler(kudu::WebCallbackRegistry::WebRequest const&, std::__1::basic_ostringstream<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*) /data/jenkins-workspace/kudu-workspace/src/kudu/server/default-path-handlers.cc:151:24
(libserver_process.so+0x487dd)
    #2 boost::detail::function::void_function_invoker2<void (*)(kudu::WebCallbackRegistry::WebRequest
const&, std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>
>*), void, kudu::WebCallbackRegistry::WebRequest const&, std::__1::basic_ostringstream<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*>::invoke(boost::detail::function::function_buffer&,
kudu::WebCallbackRegistry::WebRequest const&, std::__1::basic_ostringstream<char, std::__1::char_traits<char>,
std::__1::allocator<char> >*) /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/function/function_template.hpp:118:11
(libserver_process.so+0x4d672)
    #3 boost::function2<void, kudu::WebCallbackRegistry::WebRequest const&, std::__1::basic_ostringstream<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*>::operator()(kudu::WebCallbackRegistry::WebRequest
const&, std::__1::basic_ostringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>
>*) const /data/jenkins-workspace/kudu-workspace/thirdparty/installed/tsan/include/boost/function/function_template.hpp:770:14
(libserver_process.so+0x74d40)
    #4 kudu::Webserver::RunPathHandler(kudu::Webserver::PathHandler const&, sq_connection*,
sq_request_info*) /data/jenkins-workspace/kudu-workspace/src/kudu/server/webserver.cc:421:5
(libserver_process.so+0x735ed)
    #5 kudu::Webserver::BeginRequestCallback(sq_connection*, sq_request_info*) /data/jenkins-workspace/kudu-workspace/src/kudu/server/webserver.cc:365:10
(libserver_process.so+0x73150)
    #6 kudu::Webserver::BeginRequestCallbackStatic(sq_connection*) /data/jenkins-workspace/kudu-workspace/src/kudu/server/webserver.cc:340:20
(libserver_process.so+0x72b98)
    #7 handle_request /data/jenkins-workspace/kudu-workspace/thirdparty/src/squeasel-c304d3f3481b07bf153979155f02e0aab24d01de/squeasel.c:3854:7
(libserver_process.so+0x883f0)
    #8 process_new_connection /data/jenkins-workspace/kudu-workspace/thirdparty/src/squeasel-c304d3f3481b07bf153979155f02e0aab24d01de/squeasel.c:4464:7
(libserver_process.so+0x8645b)
    #9 worker_thread /data/jenkins-workspace/kudu-workspace/thirdparty/src/squeasel-c304d3f3481b07bf153979155f02e0aab24d01de/squeasel.c:4596
(libserver_process.so+0x8645b)

Change-Id: Ia9fc135ee2b6bb7fc7d3501750123d0b556526e0
Reviewed-on: http://gerrit.cloudera.org:8080/7534
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/230ed20d
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/230ed20d
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/230ed20d

Branch: refs/heads/master
Commit: 230ed20d54a3bf2a9e01481e68d06da3d67e42d5
Parents: 0e41d4c
Author: Todd Lipcon <todd@apache.org>
Authored: Fri Jul 28 09:13:37 2017 -0700
Committer: Adar Dembo <adar@cloudera.com>
Committed: Fri Jul 28 19:53:23 2017 +0000

----------------------------------------------------------------------
 src/kudu/util/process_memory.cc | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/230ed20d/src/kudu/util/process_memory.cc
----------------------------------------------------------------------
diff --git a/src/kudu/util/process_memory.cc b/src/kudu/util/process_memory.cc
index 59fab51..3ffcc43 100644
--- a/src/kudu/util/process_memory.cc
+++ b/src/kudu/util/process_memory.cc
@@ -214,6 +214,7 @@ int64_t CurrentConsumption() {
 }
 
 int64_t HardLimit() {
+  InitLimits();
   return g_hard_limit;
 }
 


Mime
View raw message