We observed a thread race condition in leader follower. Looks the state of LF_CH_Event is read without any thread safety outside of leader/follower. Working on some changes to have thread safe accessors (using the leader/follower lock) for checking the state outside of leader/follower where within the leader/follower loop we can just work within the leader/follower lock
23:10:07 WARNING: ThreadSanitizer: data race (pid=82284)
23:10:07 Read of size 4 at 0x7d48000177e0 by thread T16 (mutexes: write M390361):
23:10:07 #0 TAO_LF_CH_Event::successful() const TAO/tao/LF_CH_Event.cpp:115 (+0x000003fcc37e)
23:10:07 #1 TAO_LF_Event::keep_waiting() TAO/tao/../tao/LF_Event.inl:31 (+0x000003f2c62c)
23:10:07 #2 TAO_IIOP_Connector::complete_connection(int, TAO_Transport_Descriptor_Interface&, TAO_IIOP_Connection_Handler**&, TAO_IIOP_Endpoint**, unsigned int, TAO::Profile_Transport_Resolver*, TAO_LF_Multi_Event*, ACE_Time_Value*) TAO/tao/IIOP_Connector.cpp:578 (+0x000003fab8c2)
23:10:07 #3 TAO_IIOP_Connector::make_connection(TAO::Profile_Transport_Resolver*, TAO_Transport_Descriptor_Interface&, ACE_Time_Value*) TAO/tao/IIOP_Connector.cpp:217 (+0x000003fa99c2)
23:10:07 #4 TAO_Connector::connect(TAO::Profile_Transport_Resolver*, TAO_Transport_Descriptor_Interface*, ACE_Time_Value*) TAO/tao/Transport_Connector.cpp:665 (+0x000003f7087b)
23:10:07 #5 TAO::Profile_Transport_Resolver::try_connect_i(TAO_Transport_Descriptor_Interface*, ACE_Time_Value*, bool) TAO/tao/Profile_Transport_Resolver.cpp:169 (+0x000003f50075)
23:10:07 #6 TAO::Profile_Transport_Resolver::try_connect(TAO_Transport_Descriptor_Interface*, ACE_Time_Value*) TAO/tao/Profile_Transport_Resolver.cpp:112 (+0x000003f4fad2)
23:10:07 #7 TAO_Default_Endpoint_Selector::select_endpoint(TAO::Profile_Transport_Resolver*, ACE_Time_Value*) TAO/tao/Invocation_Endpoint_Selectors.cpp:64 (+0x000003f24f35)
23:10:07 #8 TAO::Profile_Transport_Resolver::resolve(ACE_Time_Value*) TAO/tao/Profile_Transport_Resolver.cpp:83 (+0x000003f4f72f)
23:10:07 #9 TAO::Invocation_Adapter::invoke_remote_i(TAO_Stub*, TAO_Operation_Details&, TAO_Pseudo_Var_T<CORBA::Object>&, ACE_Time_Value*&, TAO::Invocation_Retry_State*) TAO/tao/Invocation_Adapter.cpp:249 (+0x000003f201d6)
23:10:07 #10 TAO::Invocation_Adapter::invoke_i(TAO_Stub*, TAO_Operation_Details&) TAO/tao/Invocation_Adapter.cpp:97 (+0x000003f1e876)
23:10:07 #11 TAO::Invocation_Adapter::invoke(TAO::Exception_Data*, unsigned long) TAO/tao/Invocation_Adapter.cpp:46 (+0x000003f1dfac)
23:10:07 #12 TAO::Remote_Object_Proxy_Broker::_is_a(CORBA::Object*, char const*) TAO/tao/Remote_Object_Proxy_Broker.cpp:37 (+0x000003e58c37)
23:10:07 #13 CORBA::Object::_is_a(char const*) TAO/tao/Object.cpp:226 (+0x000003df31cb)
23:10:07 Previous write of size 4 at 0x7d48000177e0 by thread T11 (mutexes: write M374184):
23:10:07 #0 TAO_LF_CH_Event::validate_state_change(int) TAO/tao/LF_CH_Event.cpp:85 (+0x000003fcc1b3)
23:10:07 #1 TAO_LF_CH_Event::state_changed_i(int) TAO/tao/LF_CH_Event.cpp:37 (+0x000003fcbbab)
23:10:07 #2 TAO_LF_Event::state_changed(int, TAO_Leader_Follower&) TAO/tao/LF_Event.cpp:30 (+0x000003f2f72b)
23:10:07 #3 TAO_IIOP_Connection_Handler::open(void*) TAO/tao/IIOP_Connection_Handler.cpp:361 (+0x000003fa5706)
23:10:07 #4 ACE_Concurrency_Strategy<TAO_IIOP_Connection_Handler>::activate_svc_handler(TAO_IIOP_Connection_Handler*, void*) ace/Strategies_T.cpp:195 (+0x000003f9c9b0)
23:10:07 #5 TAO_Connect_Concurrency_Strategy<TAO_IIOP_Connection_Handler>::activate_svc_handler(TAO_IIOP_Connection_Handler*, void*) TAO/tao/../tao/Connector_Impl.cpp:53 (+0x000003fb0850)
23:10:07 #6 ACE_Strategy_Connector<TAO_IIOP_Connection_Handler, ACE_SOCK_Connector>::activate_svc_handler(TAO_IIOP_Connection_Handler*) ace/Connector.cpp:976 (+0x000003fb28cf)
23:10:07 #7 ACE_Connector<TAO_IIOP_Connection_Handler, ACE_SOCK_Connector>::initialize_svc_handler(int, TAO_IIOP_Connection_Handler*) ace/Connector.cpp:641 (+0x000003fb139f)
23:10:07 #8 ACE_NonBlocking_Connect_Handler<TAO_IIOP_Connection_Handler>::handle_output(int) ace/Connector.cpp:198 (+0x000003fb4c7b)
23:10:07 #9 ACE_TP_Reactor::dispatch_socket_event(ACE_EH_Dispatch_Info&) ace/TP_Reactor.cpp:543 (+0x0000040ee97f)
23:10:07 #10 ACE_TP_Reactor::handle_socket_events(int&, ACE_TP_Token_Guard&) ace/TP_Reactor.cpp:413 (+0x0000040edcbd)
23:10:07 #11 ACE_TP_Reactor::dispatch_i(ACE_Time_Value*, ACE_TP_Token_Guard&) ace/TP_Reactor.cpp:242 (+0x0000040ed1b3)
23:10:07 #12 ACE_TP_Reactor::handle_events(ACE_Time_Value*) ace/TP_Reactor.cpp:171 (+0x0000040ececf)
23:10:07 #13 ACE_Reactor::handle_events(ACE_Time_Value*) ace/Reactor.inl:185 (+0x000003e2a6d0)
23:10:07 #14 TAO_ORB_Core::run(ACE_Time_Value*, int) TAO/tao/ORB_Core.cpp:2317 (+0x000003e1cd2c)
23:10:07 #15 CORBA::ORB::run(ACE_Time_Value*) TAO/tao/ORB.cpp:188 (+0x000003dfed97)
23:10:07 #16 CORBA::ORB::run() TAO/tao/ORB.cpp:174 (+0x000003dfed04)