New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ThreadSanitizer warnings #4579

Merged
merged 10 commits into from Nov 29, 2017

Conversation

Projects
None yet
4 participants
@pirapira
Member

pirapira commented Oct 5, 2017

This PR removes various ThreadSanitizer warnings. Each commit deals with one or two warnings.

Fixes #4544.

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Oct 6, 2017

Codecov Report

Merging #4579 into develop will increase coverage by 5.9%.
The diff coverage is 52.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4579      +/-   ##
===========================================
+ Coverage    53.38%   59.28%    +5.9%     
===========================================
  Files         1611     1085     -526     
  Lines        69237    55458   -13779     
  Branches      7091     3617    -3474     
===========================================
- Hits         36963    32880    -4083     
+ Misses       31060    21486    -9574     
+ Partials      1214     1092     -122
Impacted Files Coverage Δ
libethereum/EthereumHost.h 0% <ø> (ø) ⬆️
libethereum/EthereumPeer.h 77.77% <ø> (ø) ⬆️
libethereum/Client.h 66.66% <ø> (ø) ⬆️
libp2p/Session.cpp 73.19% <0%> (-1.34%) ⬇️
libp2p/Peer.cpp 55.88% <100%> (+4.15%) ⬆️
libp2p/Peer.h 88.88% <100%> (ø) ⬆️
libp2p/Host.h 78.57% <100%> (+8.57%) ⬆️
libethereum/EthereumPeer.cpp 40% <11.76%> (+0.86%) ⬆️
libethereum/EthereumHost.cpp 7.83% <15.38%> (-1.77%) ⬇️
libp2p/Host.cpp 72% <80.48%> (+1.19%) ⬆️
... and 946 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4100691...c34498b. Read the comment docs.

codecov-io commented Oct 6, 2017

Codecov Report

Merging #4579 into develop will increase coverage by 5.9%.
The diff coverage is 52.17%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4579      +/-   ##
===========================================
+ Coverage    53.38%   59.28%    +5.9%     
===========================================
  Files         1611     1085     -526     
  Lines        69237    55458   -13779     
  Branches      7091     3617    -3474     
===========================================
- Hits         36963    32880    -4083     
+ Misses       31060    21486    -9574     
+ Partials      1214     1092     -122
Impacted Files Coverage Δ
libethereum/EthereumHost.h 0% <ø> (ø) ⬆️
libethereum/EthereumPeer.h 77.77% <ø> (ø) ⬆️
libethereum/Client.h 66.66% <ø> (ø) ⬆️
libp2p/Session.cpp 73.19% <0%> (-1.34%) ⬇️
libp2p/Peer.cpp 55.88% <100%> (+4.15%) ⬆️
libp2p/Peer.h 88.88% <100%> (ø) ⬆️
libp2p/Host.h 78.57% <100%> (+8.57%) ⬆️
libethereum/EthereumPeer.cpp 40% <11.76%> (+0.86%) ⬆️
libethereum/EthereumHost.cpp 7.83% <15.38%> (-1.77%) ⬇️
libp2p/Host.cpp 72% <80.48%> (+1.19%) ⬆️
... and 946 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4100691...c34498b. Read the comment docs.

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 6, 2017

Member

AppVeyor is stuck at "updateStats" test. I'll try it with ThreadSanitizer.

Member

pirapira commented Oct 6, 2017

AppVeyor is stuck at "updateStats" test. I'll try it with ThreadSanitizer.

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 6, 2017

Member

I cannot reproduce the AppVeyor issue.

Member

pirapira commented Oct 6, 2017

I cannot reproduce the AppVeyor issue.

@pirapira pirapira requested a review from gumb0 Oct 6, 2017

Show outdated Hide outdated libethereum/Client.h

pirapira added a commit that referenced this pull request Oct 9, 2017

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 9, 2017

Member

Took @gumb0's suggestions and still saw no ThreadSanitizer warnings.

Member

pirapira commented Oct 9, 2017

Took @gumb0's suggestions and still saw no ThreadSanitizer warnings.

pirapira added a commit that referenced this pull request Oct 9, 2017

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 10, 2017

Member
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

The problem persists after a restart.

Member

pirapira commented Oct 10, 2017

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

The problem persists after a restart.

Show outdated Hide outdated libp2p/Host.cpp
Show outdated Hide outdated libp2p/Host.h

pirapira added a commit that referenced this pull request Oct 10, 2017

pirapira added a commit that referenced this pull request Oct 10, 2017

pirapira added a commit that referenced this pull request Oct 10, 2017

@@ -164,7 +163,7 @@ class EthereumPeerObserver: public EthereumPeerObserverFace
}
private:
BlockChainSync& m_sync;
shared_ptr<BlockChainSync> m_sync;

This comment has been minimized.

@gumb0

gumb0 Oct 11, 2017

Member

I'm afraid we have the same problem with m_syncMutex below. If EthereumHost gets destroyed before EthereumPeerObserver mutex is destroyed with it... Not sure yet what to do with it

m_tq is destroyed with the Client, also not sure if EthereumPeers can outlive Client

@gumb0

gumb0 Oct 11, 2017

Member

I'm afraid we have the same problem with m_syncMutex below. If EthereumHost gets destroyed before EthereumPeerObserver mutex is destroyed with it... Not sure yet what to do with it

m_tq is destroyed with the Client, also not sure if EthereumPeers can outlive Client

This comment has been minimized.

@pirapira

pirapira Oct 12, 2017

Member

(for myself) try to remove m_syncMutex.

@pirapira

pirapira Oct 12, 2017

Member

(for myself) try to remove m_syncMutex.

This comment has been minimized.

@pirapira

pirapira Oct 12, 2017

Member

Somehow I'm making other classes hold m_tq as a weak pointer.

@pirapira

pirapira Oct 12, 2017

Member

Somehow I'm making other classes hold m_tq as a weak pointer.

This comment has been minimized.

@pirapira

pirapira Oct 12, 2017

Member

And I was able to remove m_syncMutex and still seeing no warnings from ThreadSanitizer.

@pirapira

pirapira Oct 12, 2017

Member

And I was able to remove m_syncMutex and still seeing no warnings from ThreadSanitizer.

This comment has been minimized.

@pirapira

pirapira Oct 12, 2017

Member

About m_tq, I decided to use shared/weak pointers.

@pirapira

pirapira Oct 12, 2017

Member

About m_tq, I decided to use shared/weak pointers.

Show outdated Hide outdated libp2p/Host.cpp
@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 12, 2017

Member

On a 8 core machine, I see more TSAN errors.

Member

pirapira commented Oct 12, 2017

On a 8 core machine, I see more TSAN errors.

@pirapira pirapira changed the title from Remove ThreadSanitizer warnings to [wip] Remove ThreadSanitizer warnings Oct 12, 2017

pirapira added a commit that referenced this pull request Oct 12, 2017

pirapira added a commit that referenced this pull request Oct 12, 2017

@pirapira pirapira changed the title from [wip] Remove ThreadSanitizer warnings to Remove ThreadSanitizer warnings Oct 12, 2017

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 12, 2017

Member

Done about removing warnings.

Member

pirapira commented Oct 12, 2017

Done about removing warnings.

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 23, 2017

Member

The bad news is that I'm seeing a warning from TSAN again. I think I lost some changes.

Member

pirapira commented Oct 23, 2017

The bad news is that I'm seeing a warning from TSAN again. I think I lost some changes.

Show outdated Hide outdated libp2p/Session.cpp
@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 23, 2017

Member

I recovered enough commits to make TSAN warnings go away.

Member

pirapira commented Oct 23, 2017

I recovered enough commits to make TSAN warnings go away.

pirapira added a commit that referenced this pull request Oct 23, 2017

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 24, 2017

Member

I'm again seeing some new TSAN warnings, but that looks like what #4610 is about.

Member

pirapira commented Oct 24, 2017

I'm again seeing some new TSAN warnings, but that looks like what #4610 is about.

pirapira added a commit that referenced this pull request Oct 25, 2017

pirapira added a commit that referenced this pull request Oct 25, 2017

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Oct 27, 2017

Member

Again segfault in rndStateTest.

Member

pirapira commented Oct 27, 2017

Again segfault in rndStateTest.

pirapira added some commits Oct 9, 2017

Protect Peer::m_score and m_rating under atomic
ThreadSanitizer warned:

WARNING: ThreadSanitizer: data race (pid=12735)
  Read of size 1 at 0x7b3000006b04 by main thread (mutexes: write M1110):
    #0 memcpy ??:? (eth+0x4977d7)
    #1 Peer /home/yh/src/cpp-ethereum/libdevcore/../libp2p/Peer.h:52 (eth+0x833846)
    #2 void __gnu_cxx::new_allocator<std::_List_node<dev::p2p::Peer> >::construct<dev::p2p::Peer, dev::p2p::Peer const&>(dev::p2p::Peer*, dev::p2p::Peer const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/ext/new_allocator.h:136 (eth+0x908718)
    #3 void std::allocator_traits<std::allocator<std::_List_node<dev::p2p::Peer> > >::construct<dev::p2p::Peer, dev::p2p::Peer const&>(std::allocator<std::_List_node<dev::p2p::Peer> >&, dev::p2p::Peer*, dev::p2p::Peer const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/alloc_traits.h:475 (eth+0x908551)
    #4 std::_List_node<dev::p2p::Peer>* std::__cxx11::list<dev::p2p::Peer, std::allocator<dev::p2p::Peer> >::_M_create_node<dev::p2p::Peer const&>(dev::p2p::Peer const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/stl_list.h:575 (eth+0x908400)
    #5 void std::__cxx11::list<dev::p2p::Peer, std::allocator<dev::p2p::Peer> >::_M_insert<dev::p2p::Peer const&>(std::_List_iterator<dev::p2p::Peer>, dev::p2p::Peer const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/stl_list.h:1801 (eth+0x90834e)
    #6 std::__cxx11::list<dev::p2p::Peer, std::allocator<dev::p2p::Peer> >::push_back(dev::p2p::Peer const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/stl_list.h:1118
(eth+0x8e40eb)

  Previous write of size 4 at 0x7b3000006b04 by thread T30:
    #0 dev::p2p::Session::addRating(int)
/home/yh/src/cpp-ethereum/libp2p/Session.cpp:89 (eth+0x951d86)
    #1 dev::p2p::Capability::addRating(int)
/home/yh/src/cpp-ethereum/libp2p/Capability.cpp:59 (eth+0x8c1122)
Protect Host::m_nodeTable with a mutex
For removing the following warning from ThreadSanitizer
==================
WARNING: ThreadSanitizer: data race (pid=68621)
  Write of size 8 at 0x7ffc9f6af3b8 by thread T30:
    #0 std::__shared_ptr<dev::p2p::NodeTable, (__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<dev::p2p::NodeTable, (__gnu_cxx::_Lock_policy)2> const&) /usr/include/c++/7/bits/shared_ptr_base.h:1034 (eth+0x0000005805bb)
    #1 std::shared_ptr<dev::p2p::NodeTable>::operator=(std::shared_ptr<dev::p2p::NodeTable> const&) /usr/include/c++/7/bits/shared_ptr.h:93 (eth+0x0000005805bb)
    #2 dev::p2p::Host::startedWorking() /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:761 (eth+0x0000005805bb)
    #3 operator() /home/yh/src/cpp-ethereum-vptr/libdevcore/Worker.cpp:61 (eth+0x0000004ab343)
    #4 __invoke_impl<void, dev::Worker::startWorking()::<lambda()> > /usr/include/c++/7/bits/invoke.h:60 (eth+0x0000004ab6a7)
    #5 __invoke<dev::Worker::startWorking()::<lambda()> > /usr/include/c++/7/bits/invoke.h:95 (eth+0x0000004ab6a7)
    #6 _M_invoke<0> /usr/include/c++/7/thread:234 (eth+0x0000004ab6a7)
    #7 operator() /usr/include/c++/7/thread:243 (eth+0x0000004ab6a7)
    #8 _M_run /usr/include/c++/7/thread:186 (eth+0x0000004ab6a7)
    #9 <null> <null> (libstdc++.so.6+0x0000000bc0fe)

  Previous read of size 8 at 0x7ffc9f6af3b8 by main thread (mutexes:
write M1111):
    #0 std::__shared_ptr<dev::p2p::NodeTable, (__gnu_cxx::_Lock_policy)2>::operator bool() const /usr/include/c++/7/bits/shared_ptr_base.h:1261 (eth+0x0000005716f8)
    #1 dev::p2p::Host::haveNetwork() const /home/yh/src/cpp-ethereum-vptr/libp2p/Host.h:224 (eth+0x0000005716f8)
    #2 dev::p2p::Host::start() /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:129 (eth+0x0000005716f8)
    #3 dev::WebThreeDirect::startNetwork() /home/yh/src/cpp-ethereum-vptr/libdevcore/../libwebthree/WebThree.h:204 (eth+0x0000000bf0d9)
    #4 main /home/yh/src/cpp-ethereum-vptr/eth/main.cpp:1117 (eth+0x0000000bf0d9)

atomic_load and atomic_store work on most tool chains but not on gcc 4.9
https://stackoverflow.com/questions/34205880/why-does-atomic-load-with-a-shared-ptr-not-compile-with-gcc-4-9
Protect m_timer under x_runTimer
For avoiding this warning from ThreadSanitizer:
==================
WARNING: ThreadSanitizer: data race (pid=72207)
  Write of size 8 at 0x7ffca08dd960 by thread T30:
    #0 std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*> >, std::is_move_constructible<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*>, std::is_move_assignable<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*> >::value, void>::type std::swap<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*>(boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*&, boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*&) /usr/include/c++/7/bits/move.h:199 (eth+0x00000057b9f1)
    #1 std::unique_ptr<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >, std::default_delete<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > > > >::reset(boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >*) /usr/include/c++/7/bits/unique_ptr.h:374 (eth+0x00000057b9f1)
    #2 dev::p2p::Host::run(boost::system::error_code const&) /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:665 (eth+0x00000057b9f1)
    #3 operator() /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:720 (eth+0x00000057c426)
    #4 operator() /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/bind_handler.hpp:47 (eth+0x00000057c426)
    #5 asio_handler_invoke<boost::asio::detail::binder1<dev::p2p::Host::run(const boost::system::error_code&)::<lambda(const boost::system::error_code&)>, boost::system::error_code> > /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/handler_invoke_hook.hpp:69 (eth+0x00000057c426)
    #6 invoke<boost::asio::detail::binder1<dev::p2p::Host::run(const boost::system::error_code&)::<lambda(const boost::system::error_code&)>, boost::system::error_code>, dev::p2p::Host::run(const boost::system::error_code&)::<lambda(const boost::system::error_code&)> > /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/handler_invoke_helpers.hpp:37 (eth+0x00000057c426) #7 do_complete /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/wait_handler.hpp:70
(eth+0x00000057c426)
    #8 boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long) /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/task_io_service_operation.hpp:38 (eth+0x00000058c145)
    #9 boost::asio::detail::task_io_service::do_run_one(boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex>&, boost::asio::detail::task_io_service_thread_info&, boost::system::error_code const&) /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/impl/task_io_service.ipp:372 (eth+0x00000058c145)
    #10 boost::asio::detail::task_io_service::run(boost::system::error_code&) /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/detail/impl/task_io_service.ipp:149 (eth+0x00000058c145)
    #11 boost::asio::io_service::run() /home/yh/.hunter/_Base/b96750b/a5f7296/9d3cb74/Install/include/boost/asio/impl/io_service.ipp:59 (eth+0x00000057168e)
    #12 dev::p2p::Host::doWork() /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:774 (eth+0x00000057168e)
    #13 dev::Worker::workLoop() /home/yh/src/cpp-ethereum-vptr/libdevcore/Worker.cpp:140 (eth+0x0000004a9f64)

  Previous read of size 8 at 0x7ffca08dd960 by main thread:
    #0 std::__uniq_ptr_impl<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >, std::default_delete<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > > > >::_M_ptr() const /usr/include/c++/7/bits/unique_ptr.h:147 (eth+0x0000005701cd)
    #1 std::unique_ptr<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >, std::default_delete<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > > > >::get() const /usr/include/c++/7/bits/unique_ptr.h:337 (eth+0x0000005701cd)
    #2 std::unique_ptr<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > >, std::default_delete<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > > > >::operator bool() const /usr/include/c++/7/bits/unique_ptr.h:351 (eth+0x0000005701cd)
    #3 dev::p2p::Host::stop() /home/yh/src/cpp-ethereum-vptr/libp2p/Host.cpp:152 (eth+0x0000005701cd)
    #4 dev::WebThreeDirect::~WebThreeDirect() /home/yh/src/cpp-ethereum-vptr/libwebthree/WebThree.cpp:90 (eth+0x000000456f75)
    #5 main /home/yh/src/cpp-ethereum-vptr/eth/main.cpp:937 (eth+0x0000000c0ff2)

  Location is stack of main thread.

@gumb0 gumb0 self-requested a review Nov 23, 2017

@gumb0

This comment has been minimized.

Show comment
Hide comment
@gumb0

gumb0 Nov 24, 2017

Member

I tried to simplify a little the code accessing m_nodeTable by extracting most of the operations with it to separate methods. @pirapira please verify that TSAN is still ok with it

Member

gumb0 commented Nov 24, 2017

I tried to simplify a little the code accessing m_nodeTable by extracting most of the operations with it to separate methods. @pirapira please verify that TSAN is still ok with it

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Nov 24, 2017

Member

@gumb0 I'm on it.

Member

pirapira commented Nov 24, 2017

@gumb0 I'm on it.

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Nov 24, 2017

Member

Yes, TSAN seems happy.

For the record, this is the command I run

eth/eth --ropsten --kill --pin --peerset "required:20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303 required:6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --listen 20000

and then send a SIGINT.

Member

pirapira commented Nov 24, 2017

Yes, TSAN seems happy.

For the record, this is the command I run

eth/eth --ropsten --kill --pin --peerset "required:20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303 required:6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --listen 20000

and then send a SIGINT.

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Nov 27, 2017

Member

@gumb0 do you want to make more changes?

Member

pirapira commented Nov 27, 2017

@gumb0 do you want to make more changes?

@gumb0

This comment has been minimized.

Show comment
Hide comment
@gumb0

gumb0 Nov 27, 2017

Member

Not sure yet, I will try to finish review today.

Member

gumb0 commented Nov 27, 2017

Not sure yet, I will try to finish review today.

Show outdated Hide outdated libp2p/Host.cpp
@gumb0

gumb0 approved these changes Nov 27, 2017

Ok, let's merge! :shipit:

I'm somewhat worried to be honest, because it all got more complicated, but we need to proceed somehow, let's see what happens next

@pirapira

This comment has been minimized.

Show comment
Hide comment
@pirapira

pirapira Nov 27, 2017

Member

Turning invisible complications into visible complications...

Member

pirapira commented Nov 27, 2017

Turning invisible complications into visible complications...

@pirapira pirapira merged commit 40e1025 into develop Nov 29, 2017

9 checks passed

ci/circleci: Linux-Clang5 Your tests passed on CircleCI!
Details
ci/circleci: Linux-GCC6-Debug Your tests passed on CircleCI!
Details
ci/circleci: macOS-XCode9 Your tests passed on CircleCI!
Details
codecov/patch 52.17% of diff hit (target 50%)
Details
codecov/project 59.28% (+5.9%) compared to 4100691
Details
codecov/project/app 55.25% (+6.13%) compared to 4100691
Details
codecov/project/tests 82.9% (+0.02%) compared to 4100691
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pirapira pirapira deleted the client-vptr branch Nov 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment