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

Deadlock in ErrorHandler when invoked at library initialization time. #11383

Closed
pcanal opened this issue Sep 16, 2022 · 0 comments
Closed

Deadlock in ErrorHandler when invoked at library initialization time. #11383

pcanal opened this issue Sep 16, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@pcanal
Copy link
Member

pcanal commented Sep 16, 2022

This sequence is triggered in a case where a dictionary for requested twice for the same class and upon loading the 2nd library, a Warning is being issued about the duplicated dictionary. While setting up in order to print, the initialization gROOT is triggered and this includes the loading of the rootmap files which in turns warning about the (same) class being listed in 2 distinct rootmap files.

#0  0x00007f586472654d in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f5864721e9b in _L_lock_883 () from /lib64/libpthread.so.0
#2  0x00007f5864721d68 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00007f5865797806 in DebugPrint(char const*, ...) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#4  0x00007f5865797abd in DefaultErrorHandler(int, bool, char const*, char const*) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#5  0x00007f586584fb23 in ErrorHandler () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#6  0x00007f58657aa2cc in TObject::Warning(char const*, char const*, ...) const () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#7  0x00007f584695be33 in TCling::ReadRootmapFile(char const*, TCling::TUniqueString*) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so)
#8  0x00007f5846990471 in TCling::LoadLibraryMap(char const*) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so)
#9  0x00007f584699135f in TCling::Initialize() () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCling.so)
#10 0x00007f586576cfdd in TROOT::InitInterpreter() () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#11 0x00007f586576d33f in ROOT::Internal::GetROOT2() () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#12 0x00007f586579633e in TEnv::Getvalue(char const*) const () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#13 0x00007f5865796c19 in TEnv::GetValue(char const*, char const*) const () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#14 0x00007f5865797e00 in DefaultErrorHandler(int, bool, char const*, char const*) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#15 0x00007f586584fb23 in ErrorHandler () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#16 0x00007f58658504a8 in Warning(char const*, char const*, ...) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#17 0x00007f5865881acf in ROOT::TGenericClassInfo::TGenericClassInfo(char const*, int, char const*, int, std::type_info const&, ROOT::Internal::TInitBehavior const*, TClass* (*)(), TVirtualIsAProxy*, int, int) ()
   from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/external/slc7_amd64_gcc10/lib/libCore.so)
#18 0x00007f5861aadcae in ROOT::GenerateInitInstanceLocal(edm::Wrapper<edm::Association<std::vector<reco::TrackExtra, std::allocator<reco::TrackExtra> > > > const*) [clone .constprop.0] ()
   from /build/mkortela/debug/debug2/CMSSW_12_4_8/lib/slc7_amd64_gcc10/libRecoE2EDataFormats.so
#19 0x00007f5861aab4c6 in _GLOBAL__sub_I_RecoE2EDataFormats_xr.cc () from /build/mkortela/debug/debug2/CMSSW_12_4_8/lib/slc7_amd64_gcc10/libRecoE2EDataFormats.so
#20 0x00007f586644c9c3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#21 0x00007f586645159e in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#22 0x00007f586644c7d4 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#23 0x00007f5866450b8b in _dl_open () from /lib64/ld-linux-x86-64.so.2
#24 0x00007f5865042fab in dlopen_doit () from /lib64/libdl.so.2
#25 0x00007f586644c7d4 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#26 0x00007f58650435ad in _dlerror_run () from /lib64/libdl.so.2
#27 0x00007f5865043041 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#28 0x00007f5866483946 in edmplugin::SharedLibrary::SharedLibrary(std::filesystem::__cxx11::path const&) () from /cvmfs/[cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/lib/slc7_amd64_gcc10/libFWCorePluginManager.so](http://cms.cern.ch/slc7_amd64_gcc10/cms/cmssw/CMSSW_12_4_8/lib/slc7_amd64_gcc10/libFWCorePluginManager.so)
#29 0x0000000000406bf3 in main ()
@pcanal pcanal added the bug label Sep 16, 2022
pcanal added a commit to pcanal/root that referenced this issue Sep 16, 2022
Previously if a message (for example warning of duplicate dictionary)
happened during intialization, it would trigger the initialization of gROOT
and could trigger a nested Warning. for example due to the duplicate rootmap
file entry and would cause a dead lock (recursiverly taking the
non recursive lock GetErrorMutex().
@pcanal pcanal closed this as completed in 3160daa Sep 20, 2022
pcanal added a commit that referenced this issue Sep 20, 2022
Previously if a message (for example warning of duplicate dictionary)
happened during intialization, it would trigger the initialization of gROOT
and could trigger a nested Warning. for example due to the duplicate rootmap
file entry and would cause a dead lock (recursiverly taking the
non recursive lock GetErrorMutex().
pcanal added a commit that referenced this issue Sep 20, 2022
Previously if a message (for example warning of duplicate dictionary)
happened during intialization, it would trigger the initialization of gROOT
and could trigger a nested Warning. for example due to the duplicate rootmap
file entry and would cause a dead lock (recursiverly taking the
non recursive lock GetErrorMutex().
@pcanal pcanal added this to the 6.28/00 milestone Sep 20, 2022
vgvassilev pushed a commit to vgvassilev/root that referenced this issue Oct 1, 2022
Previously if a message (for example warning of duplicate dictionary)
happened during intialization, it would trigger the initialization of gROOT
and could trigger a nested Warning. for example due to the duplicate rootmap
file entry and would cause a dead lock (recursiverly taking the
non recursive lock GetErrorMutex().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant