Skip to content
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

[UBSAN] runtime error: member call on address ... which does not point to an object of type '_Result_base' #37024

Closed
iarspider opened this issue Feb 22, 2022 · 17 comments

Comments

@iarspider
Copy link
Contributor

Several unit tests in UBSAN failed to initialize ROOT (?). E.g, Alignment/TrackerAlignment

.../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/future:212:62: runtime error: member call on address 0x2b593e6fb990 which does not point to an object of type '_Result_base'
0x2b593e6fb990: note: object has invalid vptr
 2e 63 65 72  b8 bb 5e 48 59 2b 00 00  00 00 00 00 00 00 00 00  cc 5a 8b 48 59 2b 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              invalid vptr
    #0 0x2b59404e526a in std::__future_base::_Result_base::_Deleter::operator()(std::__future_base::_Result_base*) const .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/future:212
    #1 0x2b59404e526a in std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>::~unique_ptr() .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/unique_ptr.h:361
    #2 0x2b59404e526a in std::__future_base::_State_baseV2::~_State_baseV2() .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/future:327
    #3 0x2b594609ece9 in std::_Sp_counted_ptr_inplace<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > >, std::allocator<std::promise<llvm::Expected<std::map<llvm::StringRef, llvm::JITEvaluatedSymbol, std::less<llvm::StringRef>, std::allocator<std::pair<llvm::StringRef const, llvm::JITEvaluatedSymbol> > > > > >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (.../external/slc7_amd64_gcc11/lib/libCling.so+0x1703ce9)
    #4 0x2b59460a3c93 in llvm::RuntimeDyldImpl::resolveExternalSymbols() (.../external/slc7_amd64_gcc11/lib/libCling.so+0x1708c93)
    #5 0x2b59460a3fbf in llvm::RuntimeDyldImpl::resolveRelocations() (.../external/slc7_amd64_gcc11/lib/libCling.so+0x1708fbf)
    #6 0x2b59460a431c in llvm::RuntimeDyld::finalizeWithMemoryManagerLocking() (.../external/slc7_amd64_gcc11/lib/libCling.so+0x170931c)
    #7 0x2b59450aaec7 in llvm::orc::LegacyRTDyldObjectLinkingLayer::ConcreteLinkedObject<std::shared_ptr<llvm::RuntimeDyld::MemoryManager> >::finalize() (.../external/slc7_amd64_gcc11/lib/libCling.so+0x70fec7)
    #8 0x2b59450a915e in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::LegacyRTDyldObjectLinkingLayer::ConcreteLinkedObject<std::shared_ptr<llvm::RuntimeDyld::MemoryManager> >::getSymbolMaterializer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (.../external/slc7_amd64_gcc11/lib/libCling.so+0x70e15e)
    #9 0x2b59450b4ca9 in std::_Function_handler<llvm::Expected<unsigned long> (), llvm::orc::LazyEmittingLayer<llvm::orc::LegacyIRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler> >::EmissionDeferredModule::find(llvm::StringRef, bool, llvm::orc::LegacyIRCompileLayer<cling::IncrementalJIT::RemovableObjectLinkingLayer, llvm::orc::SimpleCompiler>&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (.../external/slc7_amd64_gcc11/lib/libCling.so+0x719ca9)
    #10 0x2b59450a559c in cling::IncrementalJIT::getSymbolAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) [clone .isra.0] (.../external/slc7_amd64_gcc11/lib/libCling.so+0x70a59c)
    #11 0x2b59450a6686 in cling::IncrementalExecutor::getPointerToGlobalFromJIT(llvm::StringRef) const (.../external/slc7_amd64_gcc11/lib/libCling.so+0x70b686)
    #12 0x2b5945038d75 in cling::Interpreter::Interpreter(int, char const* const*, char const*, std::vector<std::shared_ptr<clang::ModuleFileExtension>, std::allocator<std::shared_ptr<clang::ModuleFileExtension> > > const&, bool, cling::Interpreter const*) (.../external/slc7_amd64_gcc11/lib/libCling.so+0x69dd75)
    #13 0x2b5944f99440 in TCling::TCling(char const*, char const*, char const* const*) (.../external/slc7_amd64_gcc11/lib/libCling.so+0x5fe440)
    #14 0x2b5944f9b390 in CreateInterpreter (.../external/slc7_amd64_gcc11/lib/libCling.so+0x600390)
    #15 0x2b593913ecbb in TROOT::InitInterpreter() (.../external/slc7_amd64_gcc11/lib/libCore.so+0x19ccbb)
    #16 0x2b593913f16e in ROOT::Internal::GetROOT2() (.../external/slc7_amd64_gcc11/lib/libCore.so+0x19d16e)
    #17 0x2b5943050924 in TFileAdaptor::TFileAdaptor(edm::ParameterSet const&, edm::ActivityRegistry&) .../src/IOPool/TFileAdaptor/src/TFileAdaptor.cc:164
    #18 0x2b593fdcf618 in std::_MakeUniq<TFileAdaptor>::__single_object std::make_unique<TFileAdaptor, edm::ParameterSet const&, edm::ActivityRegistry&>(edm::ParameterSet const&, edm::ActivityRegistry&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/unique_ptr.h:962
    #19 0x2b593fdcf618 in edm::serviceregistry::AllArgsMaker<TFileAdaptor, TFileAdaptor>::make(edm::ParameterSet const&, edm::ActivityRegistry&) const .../src/FWCore/ServiceRegistry/interface/ServiceMaker.h:49
    #20 0x2b593fdcf618 in edm::serviceregistry::ServiceMaker<TFileAdaptor, edm::serviceregistry::AllArgsMaker<TFileAdaptor, TFileAdaptor> >::make(edm::ParameterSet const&, edm::ActivityRegistry&, edm::serviceregistry::ServicesManager&) const .../src/FWCore/ServiceRegistry/interface/ServiceMaker.h:80
    #21 0x2b59356e44b6 in edm::serviceregistry::ServicesManager::MakerHolder::add(edm::serviceregistry::ServicesManager&) const .../src/FWCore/ServiceRegistry/src/ServicesManager.cc:50
    #22 0x2b59356e4cc8 in operator() .../src/FWCore/ServiceRegistry/src/ServicesManager.cc:269
    #23 0x2b59356e4cc8 in wrap<edm::serviceregistry::ServicesManager::createServiceFor(const edm::serviceregistry::ServicesManager::MakerHolder&)::<lambda()> > .../src/FWCore/Utilities/interface/ConvertException.h:21
    #24 0x2b59356e4cc8 in edm::serviceregistry::ServicesManager::createServiceFor(edm::serviceregistry::ServicesManager::MakerHolder const&) .../src/FWCore/ServiceRegistry/src/ServicesManager.cc:267
    #25 0x2b59356e5afa in edm::serviceregistry::ServicesManager::createServices() .../src/FWCore/ServiceRegistry/src/ServicesManager.cc:301
    #26 0x2b59356f24de in edm::serviceregistry::ServicesManager::ServicesManager(edm::ServiceToken, edm::serviceregistry::ServiceLegacy, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool) .../src/FWCore/ServiceRegistry/src/ServicesManager.cc:168
    #27 0x2b59356d8408 in void __gnu_cxx::new_allocator<edm::serviceregistry::ServicesManager>::construct<edm::serviceregistry::ServicesManager, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(edm::serviceregistry::ServicesManager*, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/ext/new_allocator.h:162
    #28 0x2b59356d8408 in void std::allocator_traits<std::allocator<edm::serviceregistry::ServicesManager> >::construct<edm::serviceregistry::ServicesManager, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(std::allocator<edm::serviceregistry::ServicesManager>&, edm::serviceregistry::ServicesManager*, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/alloc_traits.h:512
    #29 0x2b59356d8408 in std::_Sp_counted_ptr_inplace<edm::serviceregistry::ServicesManager, std::allocator<edm::serviceregistry::ServicesManager>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(std::allocator<edm::serviceregistry::ServicesManager>, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr_base.h:519
    #30 0x2b59356d8408 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<edm::serviceregistry::ServicesManager, std::allocator<edm::serviceregistry::ServicesManager>, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(edm::serviceregistry::ServicesManager*&, std::_Sp_alloc_shared_tag<std::allocator<edm::serviceregistry::ServicesManager> >, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr_base.h:650
    #31 0x2b59356d8408 in std::__shared_ptr<edm::serviceregistry::ServicesManager, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<edm::serviceregistry::ServicesManager>, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(std::_Sp_alloc_shared_tag<std::allocator<edm::serviceregistry::ServicesManager> >, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr_base.h:1342
    #32 0x2b59356d8408 in std::shared_ptr<edm::serviceregistry::ServicesManager>::shared_ptr<std::allocator<edm::serviceregistry::ServicesManager>, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(std::_Sp_alloc_shared_tag<std::allocator<edm::serviceregistry::ServicesManager> >, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr.h:409
    #33 0x2b59356d8408 in std::shared_ptr<edm::serviceregistry::ServicesManager> std::allocate_shared<edm::serviceregistry::ServicesManager, std::allocator<edm::serviceregistry::ServicesManager>, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(std::allocator<edm::serviceregistry::ServicesManager> const&, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr.h:863
    #34 0x2b59356d8408 in std::shared_ptr<edm::serviceregistry::ServicesManager> std::make_shared<edm::serviceregistry::ServicesManager, edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&>(edm::ServiceToken&, edm::serviceregistry::ServiceLegacy&, std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, bool&) .../gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/include/c++/11.2.1/bits/shared_ptr.h:879
    #35 0x2b59356d8408 in edm::ServiceRegistry::createSet(std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, edm::ServiceToken, edm::serviceregistry::ServiceLegacy, bool) .../src/FWCore/ServiceRegistry/src/ServiceRegistry.cc:86
    #36 0x2b59338ced3c in edm::ScheduleItems::initServices(std::vector<edm::ParameterSet, std::allocator<edm::ParameterSet> >&, edm::ParameterSet&, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy, bool) .../src/FWCore/Framework/src/ScheduleItems.cc:92
    #37 0x2b5932e21c3d in edm::EventProcessor::init(std::shared_ptr<edm::ProcessDesc>&, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy) .../src/FWCore/Framework/src/EventProcessor.cc:453
@cmsbuild
Copy link
Contributor

A new Issue was created by @iarspider .

@Dr15Jones, @perrotta, @dpiparo, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor

@pcanal @vgvassilev Any thoughts?

@vgvassilev
Copy link
Contributor

I am unaware of such issues but that does not mean there are no such issues. Since when do you see these reports?

Unfortunately we don't have a lot of options even if that's a valid issue as the JIT ROOT uses was deprecated in recent versions of llvm. If that's a significant problem for CMSSW we can try to investigate further.

cc: @hahnjo, @Axel-Naumann, @lhames

@Axel-Naumann
Copy link

Axel-Naumann commented Feb 23, 2022

That's during ROOT's startup, and our ASAN builds do not show this issue. Could this be due to a compiler bug, e.g. an ABI incompatibility with / without rtti? Where can I find this compiler (on cvmfs) so I can build ROOT myself and try to reproduce this?

Just FYI, llvm hasn't touched this code since llvm9 as used by ROOT's current master, i.e. there is no bug fix to be backported.

@smuzaffar
Copy link
Contributor

@Axel-Naumann , you can source /cvmfs/cms.cern.ch/slc7_amd64_gcc11/external/gcc/11.2.1-f478fee2760dbd22aaabb4e3a8fe1640/etc/profile.d/init.sh to use it

@iarspider
Copy link
Contributor Author

@Axel-Naumann gentle ping on this issue

@Axel-Naumann
Copy link

Thanks. How urgent is this? That's not mean to an excuse - we should have acted earlier - but we need to sequence a couple of items for the next few weeks, and I'd like to understand how urgent this is, or whether "May" is enough.

@iarspider
Copy link
Contributor Author

I think it's not urgent, just something that needs to be fixed eventually. @smuzaffar and @makortel can correct me if I'm wrong.

@mmusich
Copy link
Contributor

mmusich commented Jun 29, 2023

any update on this in the last year :) ?

@aandvalenzuela
Copy link
Contributor

From CMSSW, the error is still present in the IBs. In the latest UBSAN IBs the unit test ApeTest and multiple relvals failed with this issue.

@vgvassilev
Copy link
Contributor

Let's cc: @hahnjo if he has some insights.

@hahnjo
Copy link
Contributor

hahnjo commented Jul 13, 2023

No. My understanding is that it's still ROOT 6.26 and LLVM 9. Back then we also compiled libCling with -fno-rtti - this may or may not be related to the UBSAN error.

@smuzaffar
Copy link
Contributor

@iarspider , is this still happening? All relvals and unit tests for UBSAN are running fine

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 16, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

@cmsbuild please close

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

No branches or pull requests

9 participants