Repository navigation
[pull] master from facebook:master - #6
Merged
Merged
Conversation
added 2 commits
November 10, 2018 10:36
Reviewed By: yns88 fbshipit-source-id: 2a7d245b0dd6e7e9dc0606658da1001448bf1040
Reviewed By: yns88 fbshipit-source-id: 55c6dd41cdfc96731c494535ef1a11058a90adca
Rachelmorrell
pushed a commit
that referenced
this pull request
Apr 12, 2020
Summary:
There is a race condition when KvStoreWrapper and ZMQ background threads are
destroyed. This diff is an attempt to explicitly destroy KvStoreWrapper in TearDown
Also use unique_ptr instead of shared_ptr
```
WARNING: ThreadSanitizer: data race (pid=49594)
Write of size 8 at 0x7ba000000220 by thread T1:
#0 close <null> (link_monitor_test+0xdb1f6a)
#1 zmq::signaler_t::~signaler_t() /home/engshare/third-party2/zeromq/4.3.1/src/zeromq-4.3.1/src/signaler.cpp:114:20 (link_monitor_test+0xbd1274)
Previous read of size 8 at 0x7ba000000220 by main thread:
#0 epoll_ctl <null> (link_monitor_test+0xd9bdef)
#1 epoll_del /home/engshare/third-party2/libevent/1.4.14b_hphp/src/libevent-1.4.14b-stable/epoll.c:485 (link_monitor_test+0xec4253)
#2 folly::EventBaseEvent::eb_event_del() <null> (link_monitor_test+0xa747ef)
#3 folly::EventHandler::~EventHandler() <null> (link_monitor_test+0xa74a70)
#4 std::_Hashtable<int, std::pair<int const, openr::OpenrEventBase::ZmqEventHandler>, std::allocator<std::pair<int const, openr::OpenrEventBase::ZmqEventHandler> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::~_Hashtable() <null> (link_monitor_test+0x219620)
#5 openr::OpenrEventBase::~OpenrEventBase() <null> (link_monitor_test+0x212d8d)
#6 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbb7)
#7 openr::KvStore::~KvStore() <null> (link_monitor_test+0x1bfbe9)
#8 openr::KvStoreWrapper::~KvStoreWrapper() <null> (link_monitor_test+0x117533)
#9 std::_Sp_counted_ptr_inplace<openr::KvStoreWrapper, std::allocator<openr::KvStoreWrapper>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() <null> (link_monitor_test+0x116fbd)
#10 LinkMonitorTestFixture::~LinkMonitorTestFixture() <null> (link_monitor_test+0xf8285)
#11 LinkMonitorTestFixture_BasicOperation_Test::~LinkMonitorTestFixture_BasicOperation_Test() <null> (link_monitor_test+0xf7ee9)
#12 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) <null> (link_monitor_test+0xc4b2ae)
#13 __libc_start_main /home/engshare/third-party2/glibc/2.26/src/glibc-2.26/csu/libc-start.c:308:16 (libc.so.6+0x211a5)
```
Reviewed By: yi-xian
Differential Revision: D20148667
fbshipit-source-id: 71634c08df8ebbc98a6b8c4aa3329166834453f2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]