Skip to content

Data race in PolynomialMatrixReconstruction #2183

@veprbl

Description

@veprbl

Spotted on CI https://github.com/eic/EICrecon/actions/runs/18948044303/job/54107681505?pr=2124#step:7:1018

 WARNING: ThreadSanitizer: data race (pid=49)
  Write of size 8 at 0x7214066de100 by thread T2 (mutexes: write M0):
    #0 operator delete(void*, unsigned long) <null> (eicrecon+0xee0bc) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 TList::AddLast(TObject*) <null> (libCore.so.6.36+0x256e79) (BuildId: f490df688546fbae90e3ac4a06ea43b12f282481)
    #2 eicrecon::PolynomialMatrixReconstruction_factory::Process(int, unsigned long) /home/runner/work/EICrecon/EICrecon/src/factories/fardetectors/PolynomialMatrixReconstruction_factory.h:64:13 (RPOTS.so+0xad612) (BuildId: 3fc3da618c0868ed6ee332e7ebc31daf00860f83)
    #3 JOmniFactory<eicrecon::PolynomialMatrixReconstruction_factory, eicrecon::PolynomialMatrixReconstructionConfig>::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/extensions/jana/JOmniFactory.h:557:34 (RPOTS.so+0xad30c) (BuildId: 3fc3da618c0868ed6ee332e7ebc31daf00860f83)
    #4 void jana::components::JComponent::CallWithJExceptionWrapper<JMultifactory::Execute(std::shared_ptr<JEvent const> const&)::'lambda3'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JMultifactory::Execute(std::shared_ptr<JEvent const> const&)::'lambda3'()) JMultifactory.cc (libJANA.so+0x75a94) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #5 JFactory::Create(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x6ee57) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #6 JEvent::GetCollectionBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const /opt/local/include/JANA/JEvent.h:438:17 (podio.so+0xc6228) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #7 JEventProcessorPODIO::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/services/io/podio/JEventProcessorPODIO.cc:547:37 (podio.so+0xc4081) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #8 void jana::components::JComponent::CallWithJExceptionWrapper<JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()) <null> (libJANA.so+0xa4794) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)

  Previous write of size 8 at 0x7214066de100 by thread T4 (mutexes: write M1):
    #0 operator new(unsigned long) <null> (eicrecon+0xed586) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 TList::NewLink(TObject*, std::shared_ptr<TObjLink> const&) <null> (libCore.so.6.36+0x2552a4) (BuildId: f490df688546fbae90e3ac4a06ea43b12f282481)
    #2 eicrecon::PolynomialMatrixReconstruction_factory::Process(int, unsigned long) /home/runner/work/EICrecon/EICrecon/src/factories/fardetectors/PolynomialMatrixReconstruction_factory.h:64:13 (RPOTS.so+0xad612) (BuildId: 3fc3da618c0868ed6ee332e7ebc31daf00860f83)
    #3 JOmniFactory<eicrecon::PolynomialMatrixReconstruction_factory, eicrecon::PolynomialMatrixReconstructionConfig>::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/extensions/jana/JOmniFactory.h:557:34 (RPOTS.so+0xad30c) (BuildId: 3fc3da618c0868ed6ee332e7ebc31daf00860f83)
    #4 void jana::components::JComponent::CallWithJExceptionWrapper<JMultifactory::Execute(std::shared_ptr<JEvent const> const&)::'lambda3'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JMultifactory::Execute(std::shared_ptr<JEvent const> const&)::'lambda3'()) JMultifactory.cc (libJANA.so+0x75a94) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #5 JFactory::Create(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x6ee57) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #6 JEvent::GetCollectionBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const /opt/local/include/JANA/JEvent.h:438:17 (podio.so+0xc6228) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #7 JEventProcessorPODIO::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/services/io/podio/JEventProcessorPODIO.cc:547:37 (podio.so+0xc4081) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #8 void jana::components::JComponent::CallWithJExceptionWrapper<JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()) <null> (libJANA.so+0xa4794) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)

  Mutex M0 (0x7270001500c8) created at:
    #0 pthread_mutex_lock <null> (eicrecon+0x6aa82) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 JMultifactory::Execute(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x75ad2) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #2 JFactory::Create(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x6ee57) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #3 JEvent::GetCollectionBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const /opt/local/include/JANA/JEvent.h:438:17 (podio.so+0xc6228) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #4 JEventProcessorPODIO::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/services/io/podio/JEventProcessorPODIO.cc:547:37 (podio.so+0xc4081) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #5 void jana::components::JComponent::CallWithJExceptionWrapper<JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()) <null> (libJANA.so+0xa4794) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)

  Mutex M1 (0x7270002430c8) created at:
    #0 pthread_mutex_lock <null> (eicrecon+0x6aa82) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 JMultifactory::Execute(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x75ad2) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #2 JFactory::Create(std::shared_ptr<JEvent const> const&) <null> (libJANA.so+0x6ee57) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)
    #3 JEvent::GetCollectionBase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) const /opt/local/include/JANA/JEvent.h:438:17 (podio.so+0xc6228) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #4 JEventProcessorPODIO::Process(std::shared_ptr<JEvent const> const&) /home/runner/work/EICrecon/EICrecon/src/services/io/podio/JEventProcessorPODIO.cc:547:37 (podio.so+0xc4081) (BuildId: 7ebbbbcd729023230cbf3b8e686181895db383c7)
    #5 void jana::components::JComponent::CallWithJExceptionWrapper<JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, JEventProcessor::DoLegacyProcess(std::shared_ptr<JEvent const> const&)::'lambda1'()) <null> (libJANA.so+0xa4794) (BuildId: d1cd1d77d028eacd962e60659da783d38a2dc9bb)

  Thread T2 (tid=66, running) created by main thread at:
    #0 pthread_create <null> (eicrecon+0x68d05) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State>>, void (*)()) <null> (libstdc++.so.6+0xe12f8) (BuildId: 133b71e0013695cc7832680a74edb51008c4fc4c)
    #2 main /home/runner/work/EICrecon/EICrecon/src/utilities/eicrecon/eicrecon.cc:73:20 (eicrecon+0xee7a4) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)

  Thread T4 (tid=68, running) created by main thread at:
    #0 pthread_create <null> (eicrecon+0x68d05) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State>>, void (*)()) <null> (libstdc++.so.6+0xe12f8) (BuildId: 133b71e0013695cc7832680a74edb51008c4fc4c)
    #2 main /home/runner/work/EICrecon/EICrecon/src/utilities/eicrecon/eicrecon.cc:73:20 (eicrecon+0xee7a4) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab)

SUMMARY: ThreadSanitizer: data race (/home/runner/work/EICrecon/EICrecon/install/bin/eicrecon+0xee0bc) (BuildId: 0d3ce6d191114309bf33c78214b19a0ad3a994ab) in operator delete(void*, unsigned long)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions