-
Notifications
You must be signed in to change notification settings - Fork 11
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
Flag reconciliation #14
Merged
Conversation
This file contains 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
Flags updated for existing flows were not getting reflected. Fix this by checking for flags explicitly if rest of the flow matches and do a flow mod with flags in this case. Signed-off-by: Kiran Shastri <shastrinator@gmail.com>
tomflynn
approved these changes
May 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis failures are unrelated TSAN/ASAN issues that we need to cleanup
gautvenk
added a commit
that referenced
this pull request
Jun 24, 2020
355 WARNING: ThreadSanitizer: data race (pid=8183) 356 Write of size 8 at 0x7b7800000548 by thread T11 (mutexes: write M1342): 357 #0 opflex::engine::internal::OpflexPool::setTunnelMac(opflex::modb::MAC const&) include/opflex/engine/internal/OpflexPool.h:338 (libopflex.so.0+0x115151) 358 #1 opflex::engine::Processor::setTunnelMac(opflex::modb::MAC const&) /home/noiro/work/opflex/libopflex/engine/Processor.cpp:584 (libopflex.so.0+0x115151) 359 #2 opflex::ofcore::OFFramework::setTunnelMac(opflex::modb::MAC const&) /home/noiro/work/opflex/libopflex/ofcore/OFFramework.cpp:103 (libopflex.so.0+0x18dcca) 360 #3 opflexagent::Agent::setUplinkMac(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) lib/Agent.cpp:795 (libopflex_agent.so.0+0x253e33) 361 #4 opflexagent::TunnelEpManager::on_timer(boost::system::error_code const&) lib/TunnelEpManager.cpp:281 (libopflex_agent.so.0+0x22c49f) 362 #5 boost::asio::detail::wait_handler<boost::_bi::bind_t<void, boost::_mfi::mf1<void, opflexagent::TunnelEpManager, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<opflexagent::T 363 #6 boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long) /usr/include/boost/asio/detail/task_io_service_opera 364 #7 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 co 365 #8 boost::asio::detail::task_io_service::run(boost::system::error_code&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:149 (libopflex.so.0+0x16b982) 366 #9 boost::asio::io_service::run() /usr/include/boost/asio/impl/io_service.ipp:59 (libopflex_agent.so.0+0x256259) 367 #10 operator() lib/Agent.cpp:606 (libopflex_agent.so.0+0x256259) 368 #11 __invoke_impl<void, opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:60 (libopflex_agent.so.0+0x256259) 369 #12 __invoke<opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:95 (libopflex_agent.so.0+0x256259) 370 #13 _M_invoke<0> /usr/include/c++/9/thread:244 (libopflex_agent.so.0+0x256259) 371 #14 operator() /usr/include/c++/9/thread:251 (libopflex_agent.so.0+0x256259) 372 #15 _M_run /usr/include/c++/9/thread:195 (libopflex_agent.so.0+0x256259) 373 #16 <null> <null> (libstdc++.so.6+0xd086f) 374 375 Previous read of size 8 at 0x7b7800000548 by thread T4: 376 #0 opflex::engine::internal::OpflexPool::getTunnelMac() include/opflex/engine/internal/OpflexPool.h:342 (libopflex.so.0+0x1457d5) 377 #1 opflex::engine::internal::OpflexPEHandler::connected() /home/noiro/work/opflex/libopflex/engine/OpflexPEHandler.cpp:139 (libopflex.so.0+0x1457d5) 378 #2 opflex::engine::internal::OpflexClientConnection::on_state_change(yajr::Peer*, void*, yajr::StateChange::To, int) /home/noiro/work/opflex/libopflex/engine/OpflexClientConnection.cpp:158 (libopflex. 379 #3 yajr::comms::internal::CommunicationPeer::onConnect() /home/noiro/work/opflex/libopflex/comms/CommunicationPeer.cpp:116 (libopflex.so.0+0xe2aac) 380 #4 yajr::comms::internal::on_active_connection(uv_connect_s*, int) /home/noiro/work/opflex/libopflex/comms/active_connection.cpp:185 (libopflex.so.0+0xb5d00) 381 #5 <null> <null> (libuv.so.1+0x162c3) 382 #6 <null> <null> (libtsan.so.0+0x2aba6) Signed-off-by: Gautam Venkataramanan <gautam.chennai@gmail.com>
gautvenk
added a commit
that referenced
this pull request
Jun 25, 2020
- making refCount atomic 28944 Read of size 8 at 0x7b5400000ea0 by thread T6: 28945 #0 yajr::comms::internal::Peer::LoopData::onPrepareLoop() /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:38 (libopflex.so.0+0xf4188) 28946 #1 yajr::comms::internal::Peer::LoopData::onPrepareLoop(uv_prepare_s*) /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:113 (libopflex.so.0+0xf494d) 28947 #2 uv__run_prepare <null> (libuv.so.1+0x11d73) 28948 #3 <null> <null> (libtsan.so.0+0x2aba6) 28949 28950 Previous write of size 8 at 0x7b5400000ea0 by main thread: 28951 #0 yajr::comms::internal::Peer::LoopData::down() /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:238 (libopflex.so.0+0xf4bef) 28952 #1 yajr::comms::internal::Peer::LoopData::destroy(bool) /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:130 (libopflex.so.0+0xf5211) 28953 #2 yajr::finiLoop(uv_loop_s*) /home/noiro/work/opflex/libopflex/comms/common.cpp:33 (libopflex.so.0+0xbd27e) 28954 #3 opflexagent::OvsdbConnection::stop() ovs/OvsdbConnection.cpp:71 (agent_test+0x72ecc0) 28955 #4 opflexagent::OvsdbConnection_test::verify_connect::test_method() ovs/test/OvsdbConnection_test.cpp:102 (agent_test+0x594d65) 28956 #5 verify_connect_invoker ovs/test/OvsdbConnection_test.cpp:50 (agent_test+0x59720c) 28957 #6 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (agent_test+0x13cd2c) 28958 #7 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) 28959 #8 __libc_start_main <null> (libc.so.6+0x21b96) 28960 28961 Location is heap block of size 552 at 0x7b5400000c80 allocated by main thread: 28962 #0 operator new(unsigned long, std::nothrow_t const&) <null> (libtsan.so.0+0x771aa) 28963 #1 yajr::initLoop(uv_loop_s*) /home/noiro/work/opflex/libopflex/comms/common.cpp:22 (libopflex.so.0+0xbd060) 28964 #2 opflexagent::OvsdbConnection::start() ovs/OvsdbConnection.cpp:38 (agent_test+0x72f9a5) 28965 #3 opflexagent::OvsdbConnection_test::verify_connect::test_method() ovs/test/OvsdbConnection_test.cpp:51 (agent_test+0x59192e) 28966 #4 verify_connect_invoker ovs/test/OvsdbConnection_test.cpp:50 (agent_test+0x59720c) 28967 #5 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (agent_test+0x13cd2c) 28968 #6 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) 28969 #7 __libc_start_main <null> (libc.so.6+0x21b96) - Protecting peers list with peerMutex 29314 Read of size 8 at 0x7b5400000ca0 by main thread (mutexes: write M217157256601723712): 29315 #0 boost::intrusive::list_impl<boost::intrusive::bhtraits<yajr::comms::internal::Peer, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 1u>, 29316 #1 void boost::intrusive::list_impl<boost::intrusive::bhtraits<yajr::comms::internal::Peer, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 29317 #2 yajr::comms::internal::Peer::LoopData::destroy(bool) /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:134 (libopflex.so.0+0xf51fb) 29318 #3 yajr::finiLoop(uv_loop_s*) /home/noiro/work/opflex/libopflex/comms/common.cpp:33 (libopflex.so.0+0xbd27e) 29319 #4 opflexagent::OvsdbConnection::stop() ovs/OvsdbConnection.cpp:71 (agent_test+0x72ecc0) 29320 #5 opflexagent::OvsdbConnection_test::verify_connect::test_method() ovs/test/OvsdbConnection_test.cpp:102 (agent_test+0x594d65) 29321 #6 verify_connect_invoker ovs/test/OvsdbConnection_test.cpp:50 (agent_test+0x59720c) 29322 #7 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (agent_test+0x13cd2c) 29323 #8 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) 29324 #9 __libc_start_main <null> (libc.so.6+0x21b96) 29325 29326 Previous write of size 8 at 0x7b5400000ca0 by thread T6: 29327 #0 void boost::intrusive::list_impl<boost::intrusive::bhtraits<yajr::comms::internal::Peer, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 29328 #1 yajr::comms::internal::Peer::LoopData::onPrepareLoop() /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:64 (libopflex.so.0+0xf42a2) 29329 #2 yajr::comms::internal::Peer::LoopData::onPrepareLoop(uv_prepare_s*) /home/noiro/work/opflex/libopflex/comms/loopdata.cpp:112 (libopflex.so.0+0xf490d) 29330 #3 uv__run_prepare <null> (libuv.so.1+0x11d73) 29331 #4 <null> <null> (libtsan.so.0+0x2aba6) 29332 29333 Location is heap block of size 552 at 0x7b5400000c80 allocated by main thread: 29334 #0 operator new(unsigned long, std::nothrow_t const&) <null> (libtsan.so.0+0x771aa) 29335 #1 yajr::initLoop(uv_loop_s*) /home/noiro/work/opflex/libopflex/comms/common.cpp:22 (libopflex.so.0+0xbd060) 29336 #2 opflexagent::OvsdbConnection::start() ovs/OvsdbConnection.cpp:38 (agent_test+0x72f9a5) 29337 #3 opflexagent::OvsdbConnection_test::verify_connect::test_method() ovs/test/OvsdbConnection_test.cpp:51 (agent_test+0x59192e) 29338 #4 verify_connect_invoker ovs/test/OvsdbConnection_test.cpp:50 (agent_test+0x59720c) 29339 #5 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (agent_test+0x13cd2c) 29340 #6 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) 29341 #7 __libc_start_main <null> (libc.so.6+0x21b96) - Making peerMutex a recursive mutex (acquired in #11 and then in #5 again) #4 0x00005555555ea3c6 in opflex::util::LockGuard::LockGuard(pthread_mutex_t*) () at LockGuard.cpp:24 #5 0x00005555555b194b in yajr::comms::internal::Peer::LoopData::addPeer (peer=0x7b5400000780, peerState=yajr::comms::internal::Peer::LoopData::LISTENING, uv_loop=0x7fffffffcb70) at ../include/opflex/yajr/internal/comms.hpp:192 #6 yajr::comms::internal::Peer::insert (this=this@entry=0x7b5400000780, peerState=peerState@entry=yajr::comms::internal::Peer::LoopData::LISTENING) at peer.cpp:82 #7 0x00005555555a7a55 in yajr::comms::internal::ListeningTcpPeer::retry (this=0x7b5400000780) at passive_listener.cpp:186 #8 0x00005555555cca1c in yajr::comms::internal::Peer::LoopData::RetryPeer::operator() (this=<optimized out>, peer=0x7b5400000780) at loopdata.cpp:212 #9 0x00005555555ccb3e in boost::intrusive::list_impl<boost::intrusive::bhtraits<yajr::comms::internal::Peer, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)2, boost::intrusive::dft_tag, 1u>, unsigned long, false, void>::clear_and_dispose<yajr::comms::internal::Peer::LoopData::RetryPeer> (disposer=..., this=0x7b5400000030) at /usr/include/boost/move/detail/meta_utils.hpp:267 #10 yajr::comms::internal::Peer::LoopData::onPrepareLoop (this=0x7b5400000000) at loopdata.cpp:62 #11 0x00005555555cd25e in yajr::comms::internal::Peer::LoopData::onPrepareLoop (h=0x7b5400000080) at loopdata.cpp:112 #12 0x00007ffff674cd74 in uv.run_prepare () from /usr/lib/x86_64-linux-gnu/libuv.so.1 #13 0x00007ffff6746e58 in uv_run () from /usr/lib/x86_64-linux-gnu/libuv.so.1 #14 0x000055555557f726 in asynchronous_sockets::CommsFixture::loop_until_final (num_events=0, timeout=7200, should_timeout=false, transient_peers=..., post_conditions=0x555555578100 <asynchronous_sockets::pc_successful_connect()>, final_peers=..., this=0x7fffffffca60) at test/comms_test.cpp:380 #15 asynchronous_sockets::STABLE_test_ipv4::test_method() () at test/comms_test.cpp:518 Signed-off-by: Gautam Venkataramanan <gautam.chennai@gmail.com>
gautvenk
added a commit
that referenced
this pull request
Aug 7, 2020
================== WARNING: ThreadSanitizer: data race (pid=19679) Read of size 1 at 0x7b1000034990 by main thread: #0 boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> >::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> > ::implementation_type&, boost::system::error_code&) /usr/include/boost/asio/detail/deadline_timer_service.hpp:100 (libopflex.so.0+0x1630e3) #1 boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::po six_time::ptime> >::implementation_type&, boost::system::error_code&) /usr/include/boost/asio/deadline_timer_service.hpp:96 (libopflex.so.0+0x1630e3) #2 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<bo ost::posix_time::ptime> > >::cancel() /usr/include/boost/asio/basic_deadline_timer.hpp:216 (libopflex.so.0+0x1630e3) #3 opflex::engine::internal::GbpOpflexServerImpl::stop() /home/noiro/work/opflex/libopflex/engine/GbpOpflexServer.cpp:129 (libopflex.so.0+0x1630e3) #4 opflex::test::GbpOpflexServer::stop() /home/noiro/work/opflex/libopflex/engine/GbpOpflexServer.cpp:53 (libopflex.so.0+0x1631f2) #5 main server/opflex_server.cpp:297 (opflex_server+0x22fc3) Previous write of size 1 at 0x7b1000034990 by thread T12: #0 boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> >::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> > ::implementation_type&, boost::system::error_code&) /usr/include/boost/asio/detail/deadline_timer_service.hpp:109 (libopflex.so.0+0x163a50) #1 boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> >::cancel(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> > ::implementation_type&, boost::system::error_code&) /usr/include/boost/asio/detail/deadline_timer_service.hpp:98 (libopflex.so.0+0x163a50) #2 boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptime> >::expires_at(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost::posix_time::ptim e> >::implementation_type&, boost::posix_time::ptime const&, boost::system::error_code&) /usr/include/boost/asio/detail/deadline_timer_service.hpp:144 (libopflex.so.0+0x163a50) #3 boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> >::expires_at(boost::asio::detail::deadline_timer_service<boost::asio::time_traits<boost ::posix_time::ptime> >::implementation_type&, boost::posix_time::ptime const&, boost::system::error_code&) /usr/include/boost/asio/deadline_timer_service.hpp:116 (libopflex.so.0+0x163a50) #4 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<bo ost::posix_time::ptime> > >::expires_at(boost::posix_time::ptime const&) /usr/include/boost/asio/basic_deadline_timer.hpp:344 (libopflex.so.0+0x163a50) #5 opflex::engine::internal::GbpOpflexServerImpl::on_timer(boost::system::error_code const&) /home/noiro/work/opflex/libopflex/engine/GbpOpflexServer.cpp:149 (libopflex.so.0+0x163a50) #6 operator() /home/noiro/work/opflex/libopflex/engine/GbpOpflexServer.cpp:119 (libopflex.so.0+0x163f24) #7 operator() /usr/include/boost/asio/detail/bind_handler.hpp:47 (libopflex.so.0+0x163f24) #8 asio_handler_invoke<boost::asio::detail::binder1<opflex::engine::internal::GbpOpflexServerImpl::start()::<lambda(const boost::system::error_code&)>, boost::system::error_code> > /usr/include/boost/asio /handler_invoke_hook.hpp:69 (libopflex.so.0+0x163f24) #9 invoke<boost::asio::detail::binder1<opflex::engine::internal::GbpOpflexServerImpl::start()::<lambda(const boost::system::error_code&)>, boost::system::error_code>, opflex::engine::internal::GbpOpflexSe rverImpl::start()::<lambda(const boost::system::error_code&)> > /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:37 (libopflex.so.0+0x163f24) #10 do_complete /usr/include/boost/asio/detail/wait_handler.hpp:70 (libopflex.so.0+0x163f24) #11 boost::asio::detail::task_io_service_operation::complete(boost::asio::detail::task_io_service&, boost::system::error_code const&, unsigned long) /usr/include/boost/asio/detail/task_io_service_operatio n.hpp:38 (libopflex.so.0+0x16b3e2) #12 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 &) /usr/include/boost/asio/detail/impl/task_io_service.ipp:372 (libopflex.so.0+0x16b3e2) #13 boost::asio::detail::task_io_service::run(boost::system::error_code&) /usr/include/boost/asio/detail/impl/task_io_service.ipp:149 (libopflex.so.0+0x16b3e2) #14 boost::asio::io_service::run() /usr/include/boost/asio/impl/io_service.ipp:59 (libopflex.so.0+0x1625ff) #15 operator() /home/noiro/work/opflex/libopflex/engine/GbpOpflexServer.cpp:121 (libopflex.so.0+0x1625ff) #16 __invoke_impl<void, opflex::engine::internal::GbpOpflexServerImpl::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:60 (libopflex.so.0+0x1625ff) #17 __invoke<opflex::engine::internal::GbpOpflexServerImpl::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:95 (libopflex.so.0+0x1625ff) #18 _M_invoke<0> /usr/include/c++/9/thread:244 (libopflex.so.0+0x1625ff) #19 operator() /usr/include/c++/9/thread:251 (libopflex.so.0+0x1625ff) #20 _M_run /usr/include/c++/9/thread:195 (libopflex.so.0+0x1625ff) #21 <null> <null> (libstdc++.so.6+0xd086f) Signed-off-by: Gautam Venkataramanan <gautam.chennai@gmail.com>
This was referenced Aug 7, 2020
gautvenk
added a commit
that referenced
this pull request
Sep 11, 2020
WARNING: ThreadSanitizer: data race (pid=18054) Read of size 1 at 0x7b1000014d90 by thread T11: #8 opflexagent::InterfaceStatsManager::on_timer(boost::system::error_code const&) ovs/InterfaceStatsManager.cpp:105 (libopflex_agent_renderer_openvswitch.so+0x1e74e1) #14 operator() lib/Agent.cpp:605 (libopflex_agent.so.0+0x275439) #15 __invoke_impl<void, opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:60 (libopflex_agent.so.0+0x275439) #16 __invoke<opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:95 (libopflex_agent.so.0+0x275439) #17 _M_invoke<0> /usr/include/c++/9/thread:244 (libopflex_agent.so.0+0x275439) #18 operator() /usr/include/c++/9/thread:251 (libopflex_agent.so.0+0x275439) #19 _M_run /usr/include/c++/9/thread:195 (libopflex_agent.so.0+0x275439) #20 <null> <null> (libstdc++.so.6+0xd086f) Previous write of size 1 at 0x7b1000014d90 by main thread (mutexes: write M180): #4 opflexagent::InterfaceStatsManager::stop() ovs/InterfaceStatsManager.cpp:91 (libopflex_agent_renderer_openvswitch.so+0x1e81af) #5 opflexagent::OVSRenderer::stop() ovs/OVSRenderer.cpp:259 (libopflex_agent_renderer_openvswitch.so+0xcb92b) #6 opflexagent::Agent::stop() lib/Agent.cpp:718 (libopflex_agent.so.0+0x273368) #7 AgentLauncher::run() cmd/opflex_agent.cpp:128 (opflex_agent+0x3a4a7) #8 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Location is heap block of size 64 at 0x7b1000014d80 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x77cf2) #1 opflexagent::InterfaceStatsManager::start() ovs/InterfaceStatsManager.cpp:73 (libopflex_agent_renderer_openvswitch.so+0x1e9646) #2 opflexagent::OVSRenderer::start() ovs/OVSRenderer.cpp:187 (libopflex_agent_renderer_openvswitch.so+0xd5508) #3 opflexagent::Agent::start() lib/Agent.cpp:601 (libopflex_agent.so.0+0x27937a) #4 AgentLauncher::run() cmd/opflex_agent.cpp:120 (opflex_agent+0x3a438) #5 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Mutex M180 (0x7ffc4bcb7548) created at: #0 pthread_mutex_lock <null> (libtsan.so.0+0x41d5b) #1 __gthread_mutex_lock /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:749 (opflex_agent+0x3a3f0) #2 std::mutex::lock() /usr/include/c++/9/bits/std_mutex.h:100 (opflex_agent+0x3a3f0) #3 std::unique_lock<std::mutex>::lock() /usr/include/c++/9/bits/unique_lock.h:141 (opflex_agent+0x3a3f0) #4 std::unique_lock<std::mutex>::unique_lock(std::mutex&) /usr/include/c++/9/bits/unique_lock.h:71 (opflex_agent+0x3a3f0) #5 AgentLauncher::run() cmd/opflex_agent.cpp:115 (opflex_agent+0x3a3f0) #6 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Thread T11 (tid=18066, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2d3be) #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xd0b04) #2 AgentLauncher::run() cmd/opflex_agent.cpp:120 (opflex_agent+0x3a438) #3 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Signed-off-by: Gautam Venkataramanan <gautam.chennai@gmail.com>
tomflynn
pushed a commit
that referenced
this pull request
Sep 11, 2020
WARNING: ThreadSanitizer: data race (pid=18054) Read of size 1 at 0x7b1000014d90 by thread T11: #8 opflexagent::InterfaceStatsManager::on_timer(boost::system::error_code const&) ovs/InterfaceStatsManager.cpp:105 (libopflex_agent_renderer_openvswitch.so+0x1e74e1) #14 operator() lib/Agent.cpp:605 (libopflex_agent.so.0+0x275439) #15 __invoke_impl<void, opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:60 (libopflex_agent.so.0+0x275439) #16 __invoke<opflexagent::Agent::start()::<lambda()> > /usr/include/c++/9/bits/invoke.h:95 (libopflex_agent.so.0+0x275439) #17 _M_invoke<0> /usr/include/c++/9/thread:244 (libopflex_agent.so.0+0x275439) #18 operator() /usr/include/c++/9/thread:251 (libopflex_agent.so.0+0x275439) #19 _M_run /usr/include/c++/9/thread:195 (libopflex_agent.so.0+0x275439) #20 <null> <null> (libstdc++.so.6+0xd086f) Previous write of size 1 at 0x7b1000014d90 by main thread (mutexes: write M180): #4 opflexagent::InterfaceStatsManager::stop() ovs/InterfaceStatsManager.cpp:91 (libopflex_agent_renderer_openvswitch.so+0x1e81af) #5 opflexagent::OVSRenderer::stop() ovs/OVSRenderer.cpp:259 (libopflex_agent_renderer_openvswitch.so+0xcb92b) #6 opflexagent::Agent::stop() lib/Agent.cpp:718 (libopflex_agent.so.0+0x273368) #7 AgentLauncher::run() cmd/opflex_agent.cpp:128 (opflex_agent+0x3a4a7) #8 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Location is heap block of size 64 at 0x7b1000014d80 allocated by main thread: #0 operator new(unsigned long) <null> (libtsan.so.0+0x77cf2) #1 opflexagent::InterfaceStatsManager::start() ovs/InterfaceStatsManager.cpp:73 (libopflex_agent_renderer_openvswitch.so+0x1e9646) #2 opflexagent::OVSRenderer::start() ovs/OVSRenderer.cpp:187 (libopflex_agent_renderer_openvswitch.so+0xd5508) #3 opflexagent::Agent::start() lib/Agent.cpp:601 (libopflex_agent.so.0+0x27937a) #4 AgentLauncher::run() cmd/opflex_agent.cpp:120 (opflex_agent+0x3a438) #5 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Mutex M180 (0x7ffc4bcb7548) created at: #0 pthread_mutex_lock <null> (libtsan.so.0+0x41d5b) #1 __gthread_mutex_lock /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:749 (opflex_agent+0x3a3f0) #2 std::mutex::lock() /usr/include/c++/9/bits/std_mutex.h:100 (opflex_agent+0x3a3f0) #3 std::unique_lock<std::mutex>::lock() /usr/include/c++/9/bits/unique_lock.h:141 (opflex_agent+0x3a3f0) #4 std::unique_lock<std::mutex>::unique_lock(std::mutex&) /usr/include/c++/9/bits/unique_lock.h:71 (opflex_agent+0x3a3f0) #5 AgentLauncher::run() cmd/opflex_agent.cpp:115 (opflex_agent+0x3a3f0) #6 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Thread T11 (tid=18066, running) created by main thread at: #0 pthread_create <null> (libtsan.so.0+0x2d3be) #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xd0b04) #2 AgentLauncher::run() cmd/opflex_agent.cpp:120 (opflex_agent+0x3a438) #3 main cmd/opflex_agent.cpp:322 (opflex_agent+0x16dc2) Signed-off-by: Gautam Venkataramanan <gautam.chennai@gmail.com>
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.
Flags updated for existing flows were not getting reflected.
Fix this by checking for flags explicitly if rest of the flow
matches and do a flow mod with flags in this case.
Signed-off-by: Kiran Shastri shastrinator@gmail.com