cmssw: new-delete-type-mismatch in 11634.911 and 11650.911

In the latest ASAN, wf 11634.911 and 11650.911 have a new/delete mismatch that I don’t recall seeing before:

=================================================================
==2254==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x60c000086500 in thread T0:
  object passed to delete has wrong type:
  size of the allocated type:   128 bytes;
  size of the deallocated type: 104 bytes.
    #0 0x2b3222019635 in operator delete(void*, unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cc:177
    #1 0x2b32605556ee in G4AssemblyStore::Clean() (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/biglib/slc7_amd64_gcc900/pluginSimulation.so+0x1f7e6ee)
    #2 0x2b32605557f6 in G4AssemblyStore::~G4AssemblyStore() (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/biglib/slc7_amd64_gcc900/pluginSimulation.so+0x1f7e7f6)
    #3 0x2b322627dd38 in __run_exit_handlers (/lib64/libc.so.6+0x39d38)
    #4 0x2b322627dd86 in exit (/lib64/libc.so.6+0x39d86)
    #5 0x2b322626655b in __libc_start_main (/lib64/libc.so.6+0x2255b)
    #6 0x40e848  (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/bin/slc7_amd64_gcc900/cmsRun+0x40e848)

0x60c000086500 is located 0 bytes inside of 128-byte region [0x60c000086500,0x60c000086580)
allocated by thread T2 here:
    #0 0x2b32220181af in operator new(unsigned long) ../../../../libsanitizer/asan/asan_new_delete.cc:104
    #1 0x2b325ff8b2c5 in dd4hep::sim::Geant4Converter::handleAssembly(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, TGeoNode const*) const (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/biglib/slc7_amd64_gcc900/pluginSimulation.so+0x19b42c5)

Thread T2 created by T0 here:
    #0 0x2b3221f489c2 in __interceptor_pthread_create ../../../../libsanitizer/asan/asan_interceptors.cc:208
    #1 0x2b3225c01d64 in __gthread_create /data/cmsbld/jenkins/workspace/auto-builds/CMSSW_11_1_0_pre6-slc7_amd64_gcc900/build/CMSSW_11_1_0_pre6-build/BUILD/slc7_amd64_gcc900/external/gcc/9.3.0/gcc-9.3.0/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/gthr-default.h:663
    #2 0x2b3225c01d64 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) ../../../../../libstdc++-v3/src/c++11/thread.cc:135
    #3 0x2b325f3d3548 in OscarMTProducer::initializeGlobalCache(edm::ParameterSet const&) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/biglib/slc7_amd64_gcc900/pluginSimulation.so+0xdfc548)
    #4 0x2b325f3f51e1 in edm::WorkerMaker<OscarMTProducer>::makeModule(edm::ParameterSet const&) const (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/biglib/slc7_amd64_gcc900/pluginSimulation.so+0xe1e1e1)
    #5 0x2b322315d6bf in edm::Maker::makeModule(edm::MakeModuleParams const&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&) const (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x8266bf)
    #6 0x2b3222dd24a6 in edm::Factory::makeModule(edm::MakeModuleParams const&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&) const (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x49b4a6)
    #7 0x2b3222e25518 in edm::ModuleRegistry::getModule(edm::MakeModuleParams const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&, edm::signalslot::Signal<void (edm::ModuleDescription const&)>&) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x4ee518)
    #8 0x2b322316ad4a in edm::WorkerRegistry::getWorker(edm::WorkerParams const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x833d4a)
    #9 0x2b322315f5fe in edm::WorkerManager::getWorker(edm::ParameterSet&, edm::ProductRegistry&, edm::PreallocationConfiguration const*, std::shared_ptr<edm::ProcessConfiguration const>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x8285fe)
    #10 0x2b3223165bc5 in edm::WorkerManager::addToUnscheduledWorkers(edm::ParameterSet&, edm::ProductRegistry&, edm::PreallocationConfiguration const*, std::shared_ptr<edm::ProcessConfiguration>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x82ebc5)
    #11 0x2b32230bc12f in edm::StreamSchedule::StreamSchedule(std::shared_ptr<edm::TriggerResultInserter>, std::vector<edm::propagate_const<std::shared_ptr<edm::PathStatusInserter> >, std::allocator<edm::propagate_const<std::shared_ptr<edm::PathStatusInserter> > > >&, std::vector<edm::propagate_const<std::shared_ptr<edm::EndPathStatusInserter> >, std::allocator<edm::propagate_const<std::shared_ptr<edm::EndPathStatusInserter> > > >&, std::shared_ptr<edm::ModuleRegistry>, edm::ParameterSet&, edm::service::TriggerNamesService const&, edm::PreallocationConfiguration const&, edm::ProductRegistry&, edm::BranchIDListHelper&, edm::ExceptionToActionTable const&, std::shared_ptr<edm::ActivityRegistry>, std::shared_ptr<edm::ProcessConfiguration>, bool, edm::StreamID, edm::ProcessContext const*) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x78512f)
    #12 0x2b32230032de in edm::Schedule::Schedule(edm::ParameterSet&, edm::service::TriggerNamesService const&, edm::ProductRegistry&, edm::BranchIDListHelper&, edm::ThinnedAssociationsHelper&, edm::SubProcessParentageHelper const*, edm::ExceptionToActionTable const&, std::shared_ptr<edm::ActivityRegistry>, std::shared_ptr<edm::ProcessConfiguration>, bool, edm::PreallocationConfiguration const&, edm::ProcessContext const*) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x6cc2de)
    #13 0x2b32230713db in edm::ScheduleItems::initSchedule(edm::ParameterSet&, bool, edm::PreallocationConfiguration const&, edm::ProcessContext const*) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x73a3db)
    #14 0x2b3222c02ccb in edm::EventProcessor::init(std::shared_ptr<edm::ProcessDesc>&, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x2cbccb)
    #15 0x2b3222c0c053 in edm::EventProcessor::EventProcessor(std::shared_ptr<edm::ProcessDesc>, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy) (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/lib/slc7_amd64_gcc900/libFWCoreFramework.so+0x2d5053)
    #16 0x40f0eb in tbb::interface7::internal::delegated_function<main::{lambda()#1}::operator()() const::{lambda()#1} const, void>::operator()() const (/cvmfs/cms-ib.cern.ch/nweek-02678/slc7_amd64_gcc900/cms/cmssw/CMSSW_12_0_ASAN_X_2021-05-01-1100/bin/slc7_amd64_gcc900/cmsRun+0x40f0eb)
    #17 0x2b3225220551 in tbb::interface7::internal::task_arena_base::internal_execute(tbb::interface7::internal::delegate_base&) const ../../src/tbb/arena.cpp:1105

SUMMARY: AddressSanitizer: new-delete-type-mismatch ../../../../libsanitizer/asan/asan_new_delete.cc:177 in operator delete(void*, unsigned long)
==2254==HINT: if you don't care about these errors you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==2254==ABORTING

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@makortel @ianna Does Geant4AssemblyVolume need to inherit from G4AssemblyVolume, or would composition work? (from quick peek in to DD4hep code the need for inheritance was not obvious to me)

This is actually the approach it took to resolve this problem.