process_memory::HardLimit() should init limits
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 <866ca730bfc7f544e3ebce604ceeba4879f23df0@cloudera.com>

InspurUSA/kudu,EvilMcJerkface/kudu,cloudera/kudu,andrwng/kudu,EvilMcJerkface/kudu,cloudera/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,helifu/kudu,helifu/kudu,cloudera/kudu,cloudera/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,andrwng/kudu,andrwng/kudu,helifu/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,cloudera/kudu,andrwng/kudu,helifu/kudu,helifu/kudu,andrwng/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,cloudera/kudu,cloudera/kudu,InspurUSA/kudu,andrwng/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,cloudera/kudu