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

Increase memory consumption in CMSSW_15_0_X #47470

Open
mandrenguyen opened this issue Feb 27, 2025 · 34 comments
Open

Increase memory consumption in CMSSW_15_0_X #47470

mandrenguyen opened this issue Feb 27, 2025 · 34 comments

Comments

@mandrenguyen
Copy link
Contributor

While building 15_0_0 it was noticed that the memory footprint of standard workflows has increased significantly since 14_2_0, as pointed out here:
#47468 (comment)

With data taking around the corner, it's important to understand the origin of this increase and potentially mitigate it.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 27, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @mandrenguyen.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@mandrenguyen
Copy link
Contributor Author

assign core, reconstruction, simulation

@cmsbuild
Copy link
Contributor

New categories assigned: core,reconstruction,simulation

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

@smuzaffar
Copy link
Contributor

Note that for 15.0.0 we are using ROOT 6.32 where as 14.1 and 14.2 release cycles are using ROOT 6.30.

@makortel
Copy link
Contributor

makortel commented Feb 27, 2025

I ran the workflow 1000.0 in 14_2_0 and 15_0_0 with MaxMemoryPreload, and can confirm the ~300 MB increase (269 MB, to be more precise) in step 2 (RAW2DIGI_L1Reco_RECO_ALCAPRODUCER_DQM)

# 14_2_0
Memory Report: total memory requested: 58666487904
Memory Report:  max memory used: 2619917600
Memory Report:  presently used: 775976016
Memory Report:  # allocations calls:   260262211
Memory Report:  # deallocations calls: 258514403

# 15_0_0
Memory Report: total memory requested: 70785310940
Memory Report:  max memory used: 2901538312
Memory Report:  presently used: 960847608
Memory Report:  # allocations calls:   267808601
Memory Report:  # deallocations calls: 266029890

Other steps of the workflow

  • step3 (SKIM): 263 MB increase
  • step4 (HARVESTING): 4 MB decrease
  • step5 (ALCAOUTPUT): 13 MB increase

@Dr15Jones
Copy link
Contributor

I ran the same job as Matti at FNAL on an el8 VM. For step2

# 14_2_0
Memory Report: total memory requested: 58667304287
Memory Report:  max memory used: 2620528304
Memory Report:  presently used: 776118304
Memory Report:  # allocations calls:   260280179
Memory Report:  # deallocations calls: 258531462

# 15_0_0
Memory Report: total memory requested: 70786699909
Memory Report:  max memory used: 2902027216
Memory Report:  presently used: 960859088
Memory Report:  # allocations calls:   267827316
Memory Report:  # deallocations calls: 266047726

for step3

# 14_2_0
Memory Report: total memory requested: 39863260329
Memory Report:  max memory used: 4169581064
Memory Report:  presently used: 371954304
Memory Report:  # allocations calls:   138921807
Memory Report:  # deallocations calls: 138388034

# 15_0_0
Memory Report: total memory requested: 53447789522
Memory Report:  max memory used: 4445145536
Memory Report:  presently used: 574907032
Memory Report:  # allocations calls:   141187265
Memory Report:  # deallocations calls: 140620029

These are consistent with what Matti sees. I was suprised that step3 takes considerably more memory than step2.

@makortel
Copy link
Contributor

I ran the 1000.0 for the 15_0_X prereleases. In order to reduce the impact of the fluctuations (in ONNXRuntime) discussed in #46966, I ran the step2 4 times in each (including 14_2_0 and 15_0_0). The results on "max memory used" were stable within the precision I report below (so maybe this Run 1 workflow does not use ONNX)

  • 14_2_0: 2499 MB
  • 15_0_0_pre1: 2662 MB (+163 MB)
  • 15_0_0_pre2: 2752 MB (+90 MB)
  • 15_0_0_pre3: 2767 MB (+15 MB)
  • 15_0_0: 2767 MB (+0 MB)

We updated ROOT in pre2, so apparently it doesn't play a big role in this puzzle.

@makortel
Copy link
Contributor

I was suprised that step3 takes considerably more memory than step2.

edmConfigDump tells that step2 has 3 PoolOutputModules, whereas step3 has 59 (I didn't check how many of them are actually used in the job).

@makortel
Copy link
Contributor

We updated ROOT in pre2, so apparently it doesn't play a big role in this puzzle.

I ran the step2 of 1000.0 in CMSSW_14_2_0_pre2 and CMSSW_14_2_0_pre2_ROOT632. The "max memory used" increased by 16 MB with ROOT 6.32 (from 2511 MB to 2527 MB). So it seems the memory increase comes from mostly from elsewhere.

@Dr15Jones
Copy link
Contributor

So I ran the ModuleAllocMonitor service in the 1000.0 workflow step2 for both releases. That service watches all allocations/deallocations for all modules and outputs that data to a file. I then created a simple script to compare the results of the two files. In the following output a prefix of '1' denotes CMSSW_14_2 output and '2' denotes CMSSW_15_0.

The script found some differences in the configurations (to be expected)

JPTeidTight  not in  step2_CMSSW_15_0.json
   1 added 107960  maxTemp 93680

as well as some modules which ran different (probably because they were deleted early)

siPixelClustersPreSplitting
***DIFFERENT TRANSITIONS***
   1 added 3272  maxTemp 4520
   2 added 10828528  maxTemp 539600
siPixelClustersPreSplitting@cpu  not in  step2_CMSSW_15_0.json
   1 added 10856840  maxTemp 539600

siPixelDigis
***DIFFERENT TRANSITIONS***
   1 added 8824  maxTemp 10040
   2 added 4690352  maxTemp 572080
siPixelDigis@cpu  not in  step2_CMSSW_15_0.json
   1 added 4501880  maxTemp 572080

siPixelRecHitsPreSplitting
***DIFFERENT TRANSITIONS***
   1 added 4648  maxTemp 5768
   2 added 11406824  maxTemp 587864
siPixelRecHitsPreSplitting@cpu  not in  step2_CMSSW_15_0.json
   1 added 12565360  maxTemp 1163664

Then for the cases where there was agreement, I made a summary which totaled up the 'added' memory and then found the maximum of 'maxTemp' as well. For the diff calculation I matched each call and did a direct difference. A difference with a negative number means CMSSW_15 used more memory.

The source shows minimum difference

source
   1 added 117485392  maxTemp 27655104
   2 added 119621504  maxTemp 29803392
  diff (1-2) added -2136112 maxTemp -2190360

the memory changes when we clear the event are

clearEvent
   1 added -1697538264  maxTemp 688
   2 added -1713203616  maxTemp 688
  diff (1-2) added 15665352 maxTemp 0

So it looks like CMSSW_15 holds onto more memory in the Event (i.e. it deletes more at the end of the Event). Seems to be about 15MB

Then the modules with the largest change in their memory use are

SiStripClusterizerConditionsESProducer
   1 added 2100496  maxTemp 2100528
   2 added 42732816  maxTemp 42732848
  diff (1-2) added -40632320 maxTemp -40632320

DiMuonDQM
   1 added 679416  maxTemp 541448
   2 added 16596592  maxTemp 16957752
  diff (1-2) added -15917176 maxTemp -16416304

particleFlowTmp
   1 added 30414296  maxTemp 2733960
   2 added 46167136  maxTemp 2744192
  diff (1-2) added -15752840 maxTemp 4813352

RECOoutput
   1 added 176578944  maxTemp 68167680
   2 added 183851024  maxTemp 66047200
  diff (1-2) added -7272080 maxTemp -8542592
  
topSingleMuonMediumDQM
   1 added 21387424  maxTemp 21615696
   2 added 974648  maxTemp 1010584
  diff (1-2) added 20412776 maxTemp 20605112

So we added about 80MB in CMSSW_15 with these largest ones but lost 20MB for topSingleMuonMediumDQM.

@Dr15Jones
Copy link
Contributor

I modified the script to break out memory usage in construction to be separate from the rest. It had limited effect except for the two largest outliers

DiMuonDQM
   1 added 679416  maxTemp 541448
   2 added 16596592  maxTemp 16957752
  diff (1-2) construction added -15917176 maxTemp -16416304
  diff (1-2) added 0 maxTemp 0

topSingleMuonMediumDQM
   1 added 21387424  maxTemp 21615696
   2 added 974648  maxTemp 1010584
  diff (1-2) construction added 20412776 maxTemp 20605112
  diff (1-2) added 0 maxTemp 0

@Dr15Jones
Copy link
Contributor

Dr15Jones commented Feb 27, 2025

The memory increase in SiStripClusterizerConditionsESProducer is most probably from the change to SiStripClusterizerConditions

49e294b

which came in #47061

@Dr15Jones
Copy link
Contributor

Dr15Jones commented Feb 28, 2025

To try to better understand the memory usage, I plotted amount of outstanding allocations as a function of time (using PeriodicAllocMonitor) for each release for the step2 job

Image

It looks like the memory increase happens at the very beginning of the job and then the difference stays pretty constant for the rest of the job.

@makortel
Copy link
Contributor

Do these comments

So we added about 80MB in CMSSW_15 with these largest ones but lost 20MB for topSingleMuonMediumDQM.

It looks like the memory increase happens at the very beginning of the job and then the difference stays pretty constant for the rest of the job.

suggest most of the ~260 MB increase would be in the framework (or somewhere else not covered by the ActivityRegistry signals)?

@Dr15Jones
Copy link
Contributor

So I used ModuleEventAllocMonitor (which tracks individual allocation/dealloc within a full event to determine module allocations related to the algorithm vs those for the data products put in the event). This only tracks ED modules and only for work done during the event, not during construction, Run or LuminosityBlock processing.

Doing a comparison of the two releases using the step2 job used earlier, I see that on average the CMSSW_15_0 modules retain less data (about 110kB) compared to CMSSW_14_2. As this is average retained, if the vast majority of the data is gotten at the beginning of the job and then nothing else added, then this number needs to be multiplied by 100 (since that is the number of events for which it was averaged). So at most CMSSW_15 would be saving about 11MB.

As for data productions, CMSSW_15_0 is a bit larger (110kB) the vast majority coming from an increase in memory used in data products coming from particleFlowTmp/PFProducer (158kB).

So it looks like the memory increase does not come from work which happens while processing Events with ED modules.

@makortel
Copy link
Contributor

makortel commented Mar 3, 2025

I ran IgProf for the step2 of 1000.0 in 14_2_0 and 15_0_0_pre1 (that one had the largest increase, and pre1 we still had an slc7 build), full profiles here 14_2_0 and 15_0_0_pre1

The profiles show 158 MB difference via (skipping some stack frames)

So it looks like a case of cling autoparsing on a type that is consumed and does not have a dictionary

@Dr15Jones
Copy link
Contributor

So the code associated to @makortel 's traceback is

in the loop in

void ProductRegistry::initializeLookupTables(std::set<TypeID> const* productTypesConsumed,
std::set<TypeID> const* elementTypesConsumed,
std::string const* processName) {

we have the call to

checkDictionariesOfConsumedTypes(
productTypesConsumed, elementTypesConsumed, containedTypeMap, containedTypeToBaseTypesMap);

which is defined here

void ProductRegistry::checkDictionariesOfConsumedTypes(

@makortel
Copy link
Contributor

makortel commented Mar 3, 2025

With @Dr15Jones we have determined that the culprit for the ~160 MB increase is in the edm::checkClassDictionaries() call for edm::Wrapper<trigger::TriggerEventWithRefs> in

} else {
if (!checkClassDictionaries(missingDictionaries, wrappedName, wrappedType)) {
consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
}
}

In 14_2_0, the checkClassDictionaries() call for it requests total of 966 kB, of which 294 kB is left at the end of the call (largest single allocation being 904 B).

In 15_0_0_pre1, the same call requests total of 2.3 GB(!), of which 159 MB is left at the end of the call (largest single allocation being exactly 2 MB).

@makortel
Copy link
Contributor

makortel commented Mar 4, 2025

We have determined

  • In 15_0_0_pre1, the call chain from TClass::GetMissingDictionaries() for edm::Wrapper<trigger::TriggerEventWithRefs> contains TClass::GetClass() calls for e.g. TObjArray, that are not being called in 14_2_0
  • Furthermore, the TClass::GetClass() calls (or at least the first one) for TObjArray seem to be related to dynamic library load, see stack trace to such call
#7  0x00007fa96f635252 in __assert_fail () from /lib64/libc.so.6
#8  0x00007fa9709554bd in TClass::GetClass(char const*, bool, bool, unsigned long, unsigned long) ()
#9  0x00007fa9699ad260 in TKey::ReadObjectAny(TClass const*) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libRIO.so
#10 0x00007fa96995cf41 in TDirectoryFile::GetObjectChecked(char const*, TClass const*) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libRIO.so
#11 0x00007fa9571a1156 in TCling::LoadPCMImpl(TFile&) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#12 0x00007fa9571cad06 in TCling::LoadPCM(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#13 0x00007fa9571cd5e2 in TCling::RegisterModule(char const*, char const**, char const**, char const*, char const*, void (*)(), std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&, char const**, bool, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#14 0x00007fa970157e10 in TROOT::RegisterModule(char const*, char const**, char const**, char const*, char const*, void (*)(), std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > > const&, char const**, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#15 0x00007fa8e0bfc03d in (anonymous namespace)::TriggerDictionaryInitialization_DataFormatsL1TMuonPhase2_xr_Impl() [clone .lto_priv.0] () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libDataFormatsL1TMuonPhase2.so
#16 0x00007fa9707739c3 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#17 0x00007fa97077859e in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#18 0x00007fa9707737d4 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#19 0x00007fa970777b8b in _dl_open () from /lib64/ld-linux-x86-64.so.2
#20 0x00007fa96f3fcfab in dlopen_doit () from /lib64/libdl.so.2
#21 0x00007fa9707737d4 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#22 0x00007fa96f3fd5ad in _dlerror_run () from /lib64/libdl.so.2
#23 0x00007fa96f3fd041 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#24 0x00007fa95737093e in cling::utils::platform::DLOpen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#25 0x00007fa9572524f4 in cling::DynamicLibraryManager::loadLibrary(llvm::StringRef, bool, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#26 0x00007fa957181b7b in TCling::Load(char const*, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#27 0x00007fa970177649 in TSystem::Load(char const*, char const*, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#28 0x00007fa970154c1c in TROOT::LoadClass(char const*, char const*, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#29 0x00007fa95717d9b2 in TCling::ShallowAutoLoadImpl(char const*) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#30 0x00007fa95719e991 in TCling::DeepAutoLoadImpl(char const*, std::unordered_set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<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> > > >&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#31 0x00007fa95719ef54 in TCling::AutoLoad(char const*, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCling.so
#32 0x00007fa97020332f in TClass::GetClass(char const*, bool, bool, unsigned long, unsigned long) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#33 0x00007fa97095532e in TClass::GetClass(char const*, bool, bool, unsigned long, unsigned long) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libPerfToolsHack.so
#34 0x00007fa970205311 in TClass::GetMissingDictionariesForMembers(TCollection&, TCollection&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#35 0x00007fa970204f30 in TClass::GetMissingDictionariesWithRecursionCheck(TCollection&, TCollection&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#36 0x00007fa9702053d2 in TClass::GetMissingDictionariesForBaseClasses(TCollection&, TCollection&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#37 0x00007fa970204f42 in TClass::GetMissingDictionariesWithRecursionCheck(TCollection&, TCollection&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#38 0x00007fa970205328 in TClass::GetMissingDictionariesForMembers(TCollection&, TCollection&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#39 0x00007fa9702107a2 in TClass::GetMissingDictionaries(THashTable&, bool) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/external/slc7_amd64_gcc12/lib/libCore.so
#40 0x00007fa96eda4441 in edm::checkClassDictionaries(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> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, edm::TypeWithDict const&) () from /cvmfs/cms.cern.ch/slc7_amd64_gcc12/cms/cmssw/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libFWCoreReflection.so
#41 0x00007fa96ee0b8b7 in edm::ProductRegistry::checkDictionariesOfConsumedTypes(std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const*, std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const*, std::map<edm::TypeID, edm::TypeID, std::less<edm::TypeID>, std::allocator<std::pair<edm::TypeID const, edm::TypeID> > > const&, std::map<edm::TypeID, std::vector<edm::TypeID, std::allocator<edm::TypeID> >, std::less<edm::TypeID>, std::allocator<std::pair<edm::TypeID const, std::vector<edm::TypeID, std::allocator<edm::TypeID> > > > >&) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libDataFormatsProvenance.so
#42 0x00007fa96ee0e193 in edm::ProductRegistry::initializeLookupTables(std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const*, std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const*) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libDataFormatsProvenance.so
#43 0x00007fa96ee0f32d in edm::ProductRegistry::setFrozen(std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const&, std::set<edm::TypeID, std::less<edm::TypeID>, std::allocator<edm::TypeID> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libDataFormatsProvenance.so
#44 0x00007fa97061cb9d in edm::Schedule::finishSetup(edm::ParameterSet&, edm::service::TriggerNamesService const&, edm::ProductRegistry&, edm::BranchIDListHelper&, edm::ProcessBlockHelperBase&, edm::ThinnedAssociationsHelper&, edm::SubProcessParentageHelper const*, std::shared_ptr<edm::ActivityRegistry>, std::shared_ptr<edm::ProcessConfiguration>, bool, edm::PreallocationConfiguration const&, edm::ProcessContext const*) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libFWCoreFramework.so
#45 0x00007fa97062c3fb in edm::ScheduleItems::finishSchedule(edm::ScheduleItems::MadeModules, edm::ParameterSet&, edm::service::TriggerNamesService const&, bool, edm::PreallocationConfiguration const&, edm::ProcessContext const*, edm::ProcessBlockHelperBase&) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libFWCoreFramework.so
#46 0x00007fa970565127 in edm::EventProcessor::init(std::shared_ptr<edm::ProcessDesc>&, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libFWCoreFramework.so
#47 0x00007fa9705683a8 in edm::EventProcessor::EventProcessor(std::shared_ptr<edm::ProcessDesc>, edm::ServiceToken const&, edm::serviceregistry::ServiceLegacy) () from /build/mkortela/debug/issue47470/slc7/CMSSW_15_0_0_pre1/lib/slc7_amd64_gcc12/libFWCoreFramework.so
#48 0x0000000000408369 in tbb::detail::d1::task_arena_function<main::{lambda()#1}::operator()() const::{lambda()#1}, void>::operator()() const ()
#49 0x00007fa96fc059bd in tbb::detail::r1::task_arena_impl::execute (ta=..., d=...) at /data/cmsbld/jenkins/workspace/build-any-ib/w/BUILD/slc7_amd64_gcc12/external/tbb/v2021.9.0-573155027234b8f945d29403a2749d52/tbb-v2021.9.0/src/tbb/arena.cpp:688
#50 0x000000000040a266 in main::{lambda()#1}::operator()() const ()
#51 0x00000000004051f8 in main ()

In this case the missing dictionary call chain was processing vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >

Another type that appears to lead to large memory allocations is vector<edm::Ref<vector<l1t::TkElectron>,l1t::TkElectron,edm::refhelper::FindUsingAdvance<vector<l1t::TkElectron>,l1t::TkElectron> > >

@makortel
Copy link
Contributor

makortel commented Mar 4, 2025

With strace we saw that during the checkClassDictionaries() for edm::Wrapper<trigger::TriggerEventWithRefs> many shared libraries and header files were opened. We found out that by turning off -Wl,--as-needed in DataFormats/HLTReco/BuildFile.xml, no files were opened anymore during the checkClassDictionaries() call. We still need to verify this change would translate to actual memory savings.

The -Wl,--as-needed was enabled in cms-sw/cmsdist#9533 that was included in 15_0_0_pre1.

@makortel
Copy link
Contributor

makortel commented Mar 4, 2025

With strace we saw that during the checkClassDictionaries() for edm::Wrapper<trigger::TriggerEventWithRefs> many shared libraries and header files were opened. We found out that by turning off -Wl,--as-needed in DataFormats/HLTReco/BuildFile.xml, no files were opened anymore during the checkClassDictionaries() call. We still need to verify this change would translate to actual memory savings.

I verified with the AllocMonitors that with the aforementioned change

@Dr15Jones
Copy link
Contributor

@pcanal it appears that IF the shared library containing a pre-built dictionary is loaded as part of a TFile open (in this case it is brought in as a dependent of a library where the original library has a dictionary we are searching for) it sets up the TClass with enough information so that when we call TClass::GetMissingDictionaries no additional loading/header parsing is needed.

But IF the shared library has not yet been loaded in the job and it happens during the TClass::GetMissingDictionaries call is made, in addition to loading the library the headers associated with that library will also be parsed. Even though if the TClass for the associated class happen to be available BEFORE calling TClass::GetMissingDictionaries no header parsing is needed.

So the question is, is there a different code path within ROOT between how TFile::Open triggers a TClass to be read vs the call to TClass::GetMissingDictionaries? And if so, can the TClass::GetMissingDictionaries be changed to only do header parsing if and only if it is absolutely necessary?

@makortel
Copy link
Contributor

makortel commented Mar 5, 2025

So in the 15_0_0_pre1 header-parsing case, the following shared libraries are loaded during the checkClassDictionaries() call for edm::Wrapper<trigger::TriggerEventWithRefs>

libDataFormatsL1TMuonPhase2.so
libDataFormatsL1TCorrelator.so

In addition, a stat() or lstat() is called for the following libraries during the call (in alphabetical order)

libL1TriggerDTBti.so
libL1TriggerDTSectorCollector.so
libL1TriggerDTTraco.so
libL1TriggerDTTriggerServerPhi.so
libL1TriggerDTTriggerServerTheta.so
libL1TriggerGlobalCaloTrigger.so
libL1TriggerRegionalCaloTrigger.so
libSimCalorimetryEcalTrigPrimAlgos.so
libSimCalorimetryHcalTrigPrimAlgos.so
pluginCSCTriggerPrimitivesPlugins.so
pluginL1TriggerCSCTrackFinderPlugins.so
pluginL1TriggerDTTrackFinderPlugins.so
pluginL1TriggerDTTrigger.so
pluginL1TriggerGlobalCaloTriggerPlugins.so
pluginL1TriggerGlobalMuonTrigger.so
pluginL1TriggerRegionalCaloTriggerPlugins.so
pluginRecoLocalTrackerSiStripZeroSuppressionPlugins.so
pluginSimCalorimetryEcalTrigPrimProducersPlugins.so
pluginSimCalorimetryHcalTrigPrimProducersPlugins.so

@makortel
Copy link
Contributor

makortel commented Mar 5, 2025

During the same checkClassDictionaries() call, headers from the following packages were opened

DataFormats/CSCDigi
DataFormats/GEMDigi
DataFormats/L1TCorrelator
DataFormats/L1TMuon
DataFormats/L1TMuonPhase2
DataFormats/L1TParticleFlow
DataFormats/L1Trigger
DataFormats/MuonDetId
DataFormats/TrackerCommon

In addition headers from the following externals were opened

  • clhep (GlobalPhysicalConstants.h)
  • libstdc++ (math.h)
  • hsl (many headers)

@pcanal
Copy link
Contributor

pcanal commented Mar 5, 2025

is there a different code path within ROOT between how TFile::Open triggers a TClass

The code path are quite different with TClass::GetMissingDictionaries being much more thorough about probing for information (as opposed to being more or so fully on demand for the I/O paths). Using Matti's information I am trying to figure out what is the trigger.

@pcanal
Copy link
Contributor

pcanal commented Mar 5, 2025

There are code paths in TClass::GetMissingDictionaries where it might have to resolve typedefs (thus maybe requiring interpreter information). The class TriggerRefsCollections is full of typedef/using-statement and might be the trigger. Let me see if a straigh-forward change fixes the problem.

@makortel
Copy link
Contributor

makortel commented Mar 7, 2025

Here is a partial stack trace corresponding #47470 (comment) in a ROOT debug build

#28 0x00007fffd23fdff7 in cling::DynamicLibraryManager::loadLibrary (this=0x7ffff1857ea8, libStem=..., permanent=true, resolved=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp:375
#29 0x00007fffd2183fd7 in TCling::Load (this=0x7ffff50ed680, filename=0x7fff559dcc00 "/build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libDataFormatsL1TMuonPhase2.so", system=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:3536
#30 0x00007ffff7773bcb in TSystem::Load (this=0x7ffff503c800, module=0x7fff559dc680 "/build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libDataFormatsL1TMuonPhase2.so", entry=0x0, system=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/base/src/TSystem.cxx:1944
#31 0x00007ffff788a1dd in TUnixSystem::Load (this=0x7ffff503c800, module=0x7fff559dc680 "/build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libDataFormatsL1TMuonPhase2.so", entry=0x0, system=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/unix/src/TUnixSystem.cxx:2826
#32 0x00007ffff774e4a8 in TROOT::LoadClass (this=0x7ffff79fadc0 <ROOT::Internal::GetROOT1()::alloc>, libname=0x7fff55846820 "libDataFormatsL1TMuonPhase2.so", check=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/base/src/TROOT.cxx:2198
#33 0x00007fffd218eaeb in TCling::ShallowAutoLoadImpl (cls=0x7fff98ad3de0 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >")
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6190
#34 0x00007fffd218eca8 in TCling::DeepAutoLoadImpl (cls=0x7fff98ad3de0 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", visited=..., nameIsNormalized=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6223
#35 0x00007fffd218f298 in TCling::AutoLoad (this=0x7ffff50ed680, cls=0x7fff98ad3de0 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", knowDictNotLoaded=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6335
#36 0x00007ffff780cbd1 in TClass::GetClass (name=0x7fff8ffc9200 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", load=true, silent=false, hint_pair_offset=0, hint_pair_size=0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3104
#37 0x00007ffff7fe632e in TClass::GetClass(char const*, bool, bool, unsigned long, unsigned long) () from /build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libPerfToolsHack.so
#38 0x00007ffff780c611 in TClass::GetClass (name=0x7fff8ffc9200 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", load=true, silent=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:2970
#39 0x00007ffff780fdf0 in TClass::GetMissingDictionariesForMembers (this=0x7fff55a0a200, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3965
#40 0x00007ffff781042e in TClass::GetMissingDictionariesWithRecursionCheck (this=0x7fff55a0a200, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4069
#41 0x00007ffff780fca5 in TClass::GetMissingDictionariesForBaseClasses (this=0x7fff55a09f80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3936
#42 0x00007ffff7810455 in TClass::GetMissingDictionariesWithRecursionCheck (this=0x7fff55a09f80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4071
#43 0x00007ffff780fe13 in TClass::GetMissingDictionariesForMembers (this=0x7fff907cdc80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3968
#44 0x00007ffff78107a3 in TClass::GetMissingDictionaries (this=0x7fff907cdc80, result=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4126
#45 0x00007ffff6172381 in edm::checkClassDictionaries(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> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, edm::TypeWithDict const&)
    () from /build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libFWCoreReflection.so

The this->GetName() for some of the frames

  • 39: trigger::TriggerRefsCollections
  • 41: trigger::TriggerEventWithRefs
  • 43: edm::Wrapper<trigger::TriggerEventWithRefs>

@makortel
Copy link
Contributor

makortel commented Mar 7, 2025

Here is a stack trace for a "breakpoint" in 2 MB allocation (during the same checkClassDictionaries() call)

#6  0x00007ffff7fed4e1 in operator new(unsigned long, std::align_val_t) () from /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02879/el8_amd64_gcc12/cms/cmssw/CMSSW_15_0_X_2025-03-02-0000/lib/el8_amd64_gcc12/libPerfToolsAllocMonitorPreload.so
#7  0x00007fffd8cad951 in llvm::allocate_buffer (Size=2097152, Alignment=16) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/lib/Support/MemAlloc.cpp:16
#8  0x00007fffd1fc3ec3 in llvm::MallocAllocator::Allocate (this=0x7ffff17402c0, Size=2097152, Alignment=16) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/Support/AllocatorBase.h:86
#9  0x00007fffd1fdac8a in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>::StartNewSlab (this=0x7ffff17402c0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/Support/Allocator.h:339
#10 0x00007fffd1fd5263 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>::Allocate (this=0x7ffff17402c0, Size=112, Alignment=...)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/Support/Allocator.h:195
#11 0x00007fffd1fcf545 in llvm::BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096ul, 4096ul, 128ul>::Allocate (this=0x7ffff17402c0, Size=112, Alignment=8)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/Support/Allocator.h:209
#12 0x00007fffd1fc8506 in clang::ASTContext::Allocate (this=0x7ffff173fb00, Size=112, Align=8) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/AST/ASTContext.h:718
#13 0x00007fffd1fc86e4 in operator new (Bytes=112, C=..., Alignment=8) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/AST/ASTContext.h:3409
#14 0x00007fffd705235f in clang::Decl::operator new (Size=104, Ctx=..., Parent=0x7ffff1751030, Extra=0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/AST/DeclBase.cpp:105
#15 0x00007fffd703d1ad in clang::ParmVarDecl::Create (C=..., DC=0x7ffff1751030, StartLoc=..., IdLoc=..., Id=0x7fffe430cc80, T=..., TInfo=0x7fff59310d70, S=clang::SC_None, DefArg=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/AST/Decl.cpp:2848
#16 0x00007fffd3c94763 in clang::Sema::CheckParameter (this=0x7ffff17538c0, DC=0x7ffff1751030, StartLoc=..., NameLoc=..., Name=0x7fffe430cc80, T=..., TSInfo=0x7fff59310d70, SC=clang::SC_None)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaDecl.cpp:14795
#17 0x00007fffd481df14 in clang::Sema::SubstParmVarDecl (this=0x7ffff17538c0, OldParm=0x7fff9a454410, TemplateArgs=..., indexAdjustment=0, NumExpansions=..., ExpectParameterPack=false, EvaluateConstraint=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2760
#18 0x00007fffd481aafb in (anonymous namespace)::TemplateInstantiator::TransformFunctionTypeParam (this=0x7ffffffe6070, OldParm=0x7fff9a454410, indexAdjustment=0, NumExpansions=..., ExpectParameterPack=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2024
#19 0x00007fffd4827403 in clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformFunctionTypeParams (this=0x7ffffffe6070, Loc=..., Params=..., ParamTypes=0x7fff9a453e98, ParamInfos=0x0, OutParamTypes=..., PVars=0x7ffffffe5d90, PInfos=..., LastParamTransformed=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/TreeTransform.h:5870
#20 0x00007fffd482a546 in clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformFunctionTypeParams (this=0x7ffffffe6070, Loc=..., Params=..., ParamTypes=0x7fff9a453e98, ParamInfos=0x0, PTypes=..., PVars=0x7ffffffe5d90, PInfos=...)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/TreeTransform.h:700
#21 0x00007fffd4845570 in clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformFunctionProtoType<clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*, const clang::MultiLevelTemplateArgumentList&, clang::SourceLocation, clang::DeclarationName, clang::CXXRecordDecl*, clang::Qualifiers, bool)::<lambda(clang::FunctionProtoType::ExceptionSpecInfo&, bool&)> >(clang::TypeLocBuilder &, clang::FunctionProtoTypeLoc, clang::CXXRecordDecl *, clang::Qualifiers, struct {...}) (this=0x7ffffffe6070, TLB=..., TL=..., ThisContext=0x7fff59301348, ThisTypeQuals=..., TransformExceptionSpec=...)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/TreeTransform.h:6049
#22 0x00007fffd48297fc in (anonymous namespace)::TemplateInstantiator::TransformFunctionProtoType<clang::Sema::SubstFunctionDeclType(clang::TypeSourceInfo*, const clang::MultiLevelTemplateArgumentList&, clang::SourceLocation, clang::DeclarationName, clang::CXXRecordDecl*, clang::Qualifiers, bool)::<lambda(clang::FunctionProtoType::ExceptionSpecInfo&, bool&)> >(clang::TypeLocBuilder &, clang::FunctionProtoTypeLoc, clang::CXXRecordDecl *, clang::Qualifiers, struct {...}) (this=0x7ffffffe6070, TLB=..., TL=..., ThisContext=0x7fff59301348, ThisTypeQuals=..., TransformExceptionSpec=...)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2017
#23 0x00007fffd481d276 in clang::Sema::SubstFunctionDeclType (this=0x7ffff17538c0, T=0x7fff9a4543c0, Args=..., Loc=..., Entity=..., ThisContext=0x7fff59301348, ThisTypeQuals=..., EvaluateConstraints=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:2533
#24 0x00007fffd48860c8 in clang::TemplateDeclInstantiator::SubstFunctionType (this=0x7ffffffe6aa0, D=0x7fff9a454318, Params=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:4393
#25 0x00007fffd487e03c in clang::TemplateDeclInstantiator::VisitCXXMethodDecl (this=0x7ffffffe6aa0, D=0x7fff9a454318, TemplateParams=0x0, ClassScopeSpecializationArgs=..., FunctionRewriteKind=clang::TemplateDeclInstantiator::RewriteKind::None)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:2441
#26 0x00007fffd488391d in clang::TemplateDeclInstantiator::VisitCXXMethodDecl (this=0x7ffffffe6aa0, D=0x7fff9a454318) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3722
#27 0x00007fffd4867d1e in clang::declvisitor::Base<std::add_pointer, clang::TemplateDeclInstantiator, clang::Decl*>::Visit (this=0x7ffffffe6aa0, D=0x7fff9a454318)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/build/interpreter/llvm-project/llvm/tools/clang/include/clang/AST/DeclNodes.inc:443
#28 0x00007fffd481f533 in clang::Sema::InstantiateClass (this=0x7ffff17538c0, PointOfInstantiation=..., Instantiation=0x7fff59301348, Pattern=0x7fffe5263a28, TemplateArgs=..., TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:3166
#29 0x00007fffd4821166 in clang::Sema::InstantiateClassTemplateSpecialization (this=0x7ffff17538c0, PointOfInstantiation=..., ClassTemplateSpec=0x7fff59301348, TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:3651
#30 0x00007fffd49689bf in operator() (__closure=0x7ffffffe7120) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:9003
#31 0x00007fffd496fccd in llvm::function_ref<void()>::callback_fn<clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, CompleteTypeKind, TypeDiagnoser*)::<lambda()> >(intptr_t) (callable=140737488253216)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#32 0x00007fffd3423476 in llvm::function_ref<void ()>::operator()() const (this=0x7ffffffe6fd0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#33 0x00007fffd3a33eaa in clang::runWithSufficientStackSpace(llvm::function_ref<void ()>, llvm::function_ref<void ()>) (Diag=..., Fn=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/Basic/Stack.h:50
#34 0x00007fffd3a233fe in clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) (this=0x7ffff17538c0, Loc=..., Fn=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/Sema.cpp:505
#35 0x00007fffd4969162 in clang::Sema::RequireCompleteTypeImpl (this=0x7ffff17538c0, Loc=..., T=..., Kind=clang::Sema::CompleteTypeKind::Normal, Diagnoser=0x7ffffffe7340)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:9002
#36 0x00007fffd496809a in clang::Sema::RequireCompleteType (this=0x7ffff17538c0, Loc=..., T=..., Kind=clang::Sema::CompleteTypeKind::Normal, Diagnoser=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:8724
#37 0x00007fffd3cbf41d in clang::Sema::RequireCompleteSizedType<>(clang::SourceLocation, clang::QualType, unsigned int) (this=0x7ffff17538c0, Loc=..., T=..., DiagID=3210)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/Sema/Sema.h:2550
#38 0x00007fffd3ca1c4a in clang::Sema::CheckFieldDecl (this=0x7ffff17538c0, Name=..., T=..., TInfo=0x7fff593016a0, Record=0x7fff592f28e8, Loc=..., Mutable=false, BitWidth=0x0, InitStyle=clang::ICIS_NoInit, TSSL=..., AS=clang::AS_private, PrevDecl=0x0, D=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaDecl.cpp:17981
#39 0x00007fffd48792e6 in clang::TemplateDeclInstantiator::VisitFieldDecl (this=0x7ffffffe7b90, D=0x7fffe0ab0f50) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:1239
#40 0x00007fffd4867ca6 in clang::declvisitor::Base<std::add_pointer, clang::TemplateDeclInstantiator, clang::Decl*>::Visit (this=0x7ffffffe7b90, D=0x7fffe0ab0f50)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/build/interpreter/llvm-project/llvm/tools/clang/include/clang/AST/DeclNodes.inc:413
#41 0x00007fffd481f533 in clang::Sema::InstantiateClass (this=0x7ffff17538c0, PointOfInstantiation=..., Instantiation=0x7fff592f28e8, Pattern=0x7fffe4aca940, TemplateArgs=..., TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:3166
#42 0x00007fffd4821166 in clang::Sema::InstantiateClassTemplateSpecialization (this=0x7ffff17538c0, PointOfInstantiation=..., ClassTemplateSpec=0x7fff592f28e8, TSK=clang::TSK_ImplicitInstantiation, Complain=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp:3651
#43 0x00007fffd49689bf in operator() (__closure=0x7ffffffe8210) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:9003
#44 0x00007fffd496fccd in llvm::function_ref<void()>::callback_fn<clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, CompleteTypeKind, TypeDiagnoser*)::<lambda()> >(intptr_t) (callable=140737488257552)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45
#45 0x00007fffd3423476 in llvm::function_ref<void ()>::operator()() const (this=0x7ffffffe80c0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68
#46 0x00007fffd3a33eaa in clang::runWithSufficientStackSpace(llvm::function_ref<void ()>, llvm::function_ref<void ()>) (Diag=..., Fn=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/Basic/Stack.h:50
#47 0x00007fffd3a233fe in clang::Sema::runWithSufficientStackSpace(clang::SourceLocation, llvm::function_ref<void ()>) (this=0x7ffff17538c0, Loc=..., Fn=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/Sema.cpp:505
#48 0x00007fffd4969162 in clang::Sema::RequireCompleteTypeImpl (this=0x7ffff17538c0, Loc=..., T=..., Kind=clang::Sema::CompleteTypeKind::Normal, Diagnoser=0x7ffffffe8430)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:9002
#49 0x00007fffd496809a in clang::Sema::RequireCompleteType (this=0x7ffff17538c0, Loc=..., T=..., Kind=clang::Sema::CompleteTypeKind::Normal, Diagnoser=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaType.cpp:8724
#50 0x00007fffd3cbf41d in clang::Sema::RequireCompleteSizedType<>(clang::SourceLocation, clang::QualType, unsigned int) (this=0x7ffff17538c0, Loc=..., T=..., DiagID=3210)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/Sema/Sema.h:2550
#51 0x00007fffd3ca1c4a in clang::Sema::CheckFieldDecl (this=0x7ffff17538c0, Name=..., T=..., TInfo=0x7fff592f93e8, Record=0x7fff592effc8, Loc=..., Mutable=false, BitWidth=0x0, InitStyle=clang::ICIS_NoInit, TSSL=..., AS=clang::AS_private, PrevDecl=0x0, D=0x7ffffffe9830)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaDecl.cpp:17981
#52 0x00007fffd3ca1a0a in clang::Sema::HandleField (this=0x7ffff17538c0, S=0x7fffe2271d80, Record=0x7fff592effc8, DeclStart=..., D=..., BitWidth=0x0, InitStyle=clang::ICIS_NoInit, AS=clang::AS_private)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaDecl.cpp:17930
#53 0x00007fffd3d97b65 in clang::Sema::ActOnCXXMemberDeclarator (this=0x7ffff17538c0, S=0x7fffe2271d80, AS=clang::AS_private, D=..., TemplateParameterLists=..., BW=0x0, VS=..., InitStyle=clang::ICIS_NoInit)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Sema/SemaDeclCXX.cpp:3505
#54 0x00007fffd36a535f in clang::Parser::ParseCXXClassMemberDeclaration (this=0x7fffe4500800, AS=clang::AS_private, AccessAttrs=..., TemplateInfo=..., TemplateDiags=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3032
#55 0x00007fffd36a6d1c in clang::Parser::ParseCXXClassMemberDeclarationWithPragmas (this=0x7fffe4500800, AS=@0x7ffffffeb0cc: clang::AS_private, AccessAttrs=..., TagType=clang::TST_class, TagDecl=0x7fff592effc8)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3391
#56 0x00007fffd36a7a35 in clang::Parser::ParseCXXMemberSpecification (this=0x7fffe4500800, RecordLoc=..., AttrFixitLoc=..., Attrs=..., TagType=26, TagDecl=0x7fff592effc8)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3595
#57 0x00007fffd36a1bd6 in clang::Parser::ParseClassSpecifier (this=0x7fffe4500800, TagTokKind=clang::tok::kw_class, StartLoc=..., DS=..., TemplateInfo=..., AS=clang::AS_none, EnteringContext=true, DSC=clang::Parser::DeclSpecContext::DSC_top_level, Attributes=...)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:2107
#58 0x00007fffd367a992 in clang::Parser::ParseDeclarationSpecifiers (this=0x7fffe4500800, DS=..., TemplateInfo=..., AS=clang::AS_none, DSContext=clang::Parser::DeclSpecContext::DSC_top_level, LateAttrs=0x0, AllowImplicitTypename=clang::ImplicitTypenameContext::Yes)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDecl.cpp:4221
#59 0x00007fffd368d269 in clang::Parser::ParseDeclarationSpecifiers (this=0x7fffe4500800, DS=..., TemplateInfo=..., AS=clang::AS_none, DSC=clang::Parser::DeclSpecContext::DSC_top_level, LateAttrs=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/include/clang/Parse/Parser.h:2457
#60 0x00007fffd3778eed in clang::Parser::ParseDeclOrFunctionDefInternal (this=0x7fffe4500800, Attrs=..., DeclSpecAttrs=..., DS=..., AS=clang::AS_none) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/Parser.cpp:1128
#61 0x00007fffd37795e9 in clang::Parser::ParseDeclarationOrFunctionDefinition (this=0x7fffe4500800, Attrs=..., DeclSpecAttrs=..., DS=0x0, AS=clang::AS_none) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/Parser.cpp:1235
#62 0x00007fffd37789b6 in clang::Parser::ParseExternalDeclaration (this=0x7fffe4500800, Attrs=..., DeclSpecAttrs=..., DS=0x0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/Parser.cpp:1050
#63 0x00007fffd369a73f in clang::Parser::ParseInnerNamespace (this=0x7fffe4500800, InnerNSs=..., index=0, InlineLoc=..., attrs=..., Tracker=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:261
#64 0x00007fffd369a582 in clang::Parser::ParseNamespace (this=0x7fffe4500800, Context=clang::DeclaratorContext::File, DeclEnd=..., InlineLoc=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:238
#65 0x00007fffd367198b in clang::Parser::ParseDeclaration (this=0x7fffe4500800, Context=clang::DeclaratorContext::File, DeclEnd=..., DeclAttrs=..., DeclSpecAttrs=..., DeclSpecStart=0x0)
#66 0x00007fffd377845f in clang::Parser::ParseExternalDeclaration (this=0x7fffe4500800, Attrs=..., DeclSpecAttrs=..., DS=0x0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/Parser.cpp:966
#67 0x00007fffd3777720 in clang::Parser::ParseTopLevelDecl (this=0x7fffe4500800, Result=..., ImportState=@0x7ffffffee194: clang::Sema::ModuleImportState::NotACXX20Module)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/llvm-project/clang/lib/Parse/Parser.cpp:752
#68 0x00007fffd2549212 in cling::IncrementalParser::ParseInternal (this=0x7fffe1847300, input=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:932
#69 0x00007fffd2548ba5 in cling::IncrementalParser::Compile (this=0x7fffe1847300, input=..., Opts=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/cling/lib/Interpreter/IncrementalParser.cpp:841
#70 0x00007fffd24266c4 in cling::Interpreter::DeclareInternal (this=0x7fffe454b500, input=..., CO=..., T=0x0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/cling/lib/Interpreter/Interpreter.cpp:1371
#71 0x00007fffd242503f in cling::Interpreter::parseForModule (this=0x7fffe454b500, input=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/interpreter/cling/lib/Interpreter/Interpreter.cpp:961
#72 0x00007fffd218f4b4 in ExecAutoParse (what=0x7fff53712037 "\n#line 1 \"DataFormatsL1TMuonPhase2_xr dictionary payload\"\n\n#ifndef CMS_DICT_IMPL\n  #define CMS_DICT_IMPL 1\n#endif\n#ifndef _REENTRANT\n  #define _REENTRANT 1\n#endif\n#ifndef GNUSOURCE\n  #define GNUSOURCE"..., header=false, interpreter=0x7fffe454b500)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6377
#73 0x00007fffd218fd44 in TCling::AutoParseImplRecurse (this=0x7ffff50ed680, cls=0x7fff6302df60 "vector<l1t::TrackerMuon>", topLevel=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6482
#74 0x00007fffd2190096 in TCling::AutoParseImplRecurse (this=0x7ffff50ed680, cls=0x7fff98a9cd40 "edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon>", topLevel=true)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6518
#75 0x00007fffd21903c9 in TCling::AutoParse (this=0x7ffff50ed680, cls=0x7fff98a9cd40 "edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon>") at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:6567
#76 0x00007fffd21773cf in TClingLookupHelper__AutoParse (cname=0x7fff98a9cd40 "edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon>") at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/metacling/src/TCling.cxx:903
#77 0x00007fffd1faddf7 in ROOT::TMetaUtils::TClingLookupHelper::GetPartiallyDesugaredNameWithScopeHandling (this=0x7fffe40cd100, tname=..., result=..., dropstd=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/clingutils/src/TClingUtils.cxx:578
#78 0x00007ffff77e72cc in TClassEdit::TSplitType::ShortType (this=0x7ffffffef730, answ=..., mode=3618) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/foundation/src/TClassEdit.cxx:454
#79 0x00007ffff77eaa81 in TClassEdit::ShortType[abi:cxx11](char const*, int) (typeDesc=0x7fff6302ba20 "edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> >", mode=3618)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/foundation/src/TClassEdit.cxx:1312
#80 0x00007ffff77e71c9 in TClassEdit::TSplitType::ShortType (this=0x7ffffffef8d0, answ=..., mode=3618) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/foundation/src/TClassEdit.cxx:446
#81 0x00007ffff77e8952 in TClassEdit::GetNormalizedName (norm_name=..., name=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/foundation/src/TClassEdit.cxx:871
#82 0x00007ffff780cc31 in TClass::GetClass (name=0x7fff9b290160 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", load=true, silent=false, hint_pair_offset=0, hint_pair_size=0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3114
#83 0x00007ffff780c611 in TClass::GetClass (name=0x7fff9b290160 "vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >", load=true, silent=false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:2970
#84 0x00007ffff780fdf0 in TClass::GetMissingDictionariesForMembers (this=0x7fff63483200, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3965
#85 0x00007ffff781042e in TClass::GetMissingDictionariesWithRecursionCheck (this=0x7fff63483200, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4069
#86 0x00007ffff780fca5 in TClass::GetMissingDictionariesForBaseClasses (this=0x7fff63482f80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3936
#87 0x00007ffff7810455 in TClass::GetMissingDictionariesWithRecursionCheck (this=0x7fff63482f80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4071
#88 0x00007ffff780fe13 in TClass::GetMissingDictionariesForMembers (this=0x7fff90772c80, result=..., visited=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:3968
#89 0x00007ffff78107a3 in TClass::GetMissingDictionaries (this=0x7fff90772c80, result=..., recurse=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.32.11-e749455e321527960cbb6ea7499c176f/root-6.32.11/core/meta/src/TClass.cxx:4126
#90 0x00007ffff672a381 in edm::checkClassDictionaries(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> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, edm::TypeWithDict const&)
    () from /build/mkortela/debug/issue47470/CMSSW_15_0_X_2025-03-06-1100/lib/el8_amd64_gcc12/libFWCoreReflection.so

On stack frame 75 it seems like the header parsing is done for type edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon

On stack frame 81 the GetNormalizedName() is called for name = vector<edm::Ref<vector<l1t::TrackerMuon>,l1t::TrackerMuon,edm::refhelper::FindUsingAdvance<vector<l1t::TrackerMuon>,l1t::TrackerMuon> > >.

@jfernan2
Copy link
Contributor

My two cents: from the RECO profiling, we started to see the following memory messages since 15_0_0_pre2, not in pre1:

MemoryReport> EndJob: virtual size 5262.04 Mbytes, RSS 2575.98 Mbytes, PSS 1878.62 MBytes, Private 1878.62
mmapped memory pages 3972.49 Mbytes (VSize), 1663.66 MBytes (RSS)
mmapped file pages 1288.93 Mbytes (VSize), 214.375 MBytes (RSS)
of which .so's 965.402 Mbytes (VSize), 193.785 MBytes (RSS)
of which PCM's 323.094 Mbytes (VSize), 20.4688 MBytes (RSS)
of which other 0.4375 Mbytes (VSize), 0.121094 MBytes (RSS)
Jemalloc allocated 1730.3 MBytes, active 1781.62 MBytes

Full details in the Reco profiling web page:
https://cms-reco-profiling.web.cern.ch/cms-reco-profiling/

Changes in RECO from pre1 to pre2 were numerous:
https://twiki.cern.ch/twiki/bin/viewauth/CMS/RecoTagSetDigest150X#CMSSW_15_0_0_pre2_released_on_20

@dan131riley
Copy link

My two cents: from the RECO profiling, we started to see the following memory messages since 15_0_0_pre2, not in pre1:

Those new messages are from #46859, which first appeared in pre2.

pcanal added a commit to pcanal/root that referenced this issue Mar 13, 2025
If a library was loaded, the alias for a class were also loaded and a non normalized name might lead to a match.
If we skip this check, then the next step will normalized the name and check for typedef inside the name (if
it is a template instance name) and if the name are not found as is, it may lead to loading the header file.

ie. this fixes root-project#17992 and cms-sw/cmssw#47470
@pcanal
Copy link
Contributor

pcanal commented Mar 14, 2025

The problem should be solved by root-project/root#17994

@smuzaffar
Copy link
Contributor

smuzaffar commented Mar 17, 2025

thanks @pcanal for root-project/root#17994 . @makortel I have tested this change for our ROOT master based IBs and max memory allocation is decreased ( see details here for cms-sw/root#220 tests) .

@pcanal , do you have a backport of root-project/root#17994 for root 6.32 branch?

@pcanal
Copy link
Contributor

pcanal commented Mar 17, 2025

The backport will be done as soon as the main PR has been reviewed.

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

8 participants