Skip to content

Conversation

@silverweed
Copy link
Contributor

@silverweed silverweed commented Aug 14, 2024

Rebase of #8124

Fixes #7955

@silverweed silverweed self-assigned this Aug 14, 2024
@silverweed silverweed marked this pull request as draft August 14, 2024 09:27
@github-actions
Copy link

github-actions bot commented Aug 14, 2024

Test Results

    13 files      13 suites   2d 22h 32m 2s ⏱️
 3 027 tests  3 027 ✅ 0 💤 0 ❌
33 832 runs  33 832 ✅ 0 💤 0 ❌

Results for commit aa21d16.

♻️ This comment has been updated with latest results.

@silverweed silverweed requested a review from hahnjo August 14, 2024 11:44
@silverweed silverweed marked this pull request as ready for review August 14, 2024 11:44
@hahnjo hahnjo requested a review from vgvassilev August 14, 2024 11:47
@hahnjo
Copy link
Member

hahnjo commented Aug 14, 2024

The rebase fixes should likely be folded into the respective commits so that each one of them builds. That would allow future bisection in case there are problems and IMHO we don't want to squash-merge a +449 -148 change touching Cling and core/metacling...

@silverweed silverweed force-pushed the issue7955-type-first-spec-2 branch from d012c8e to a1310c3 Compare August 14, 2024 15:24
@silverweed
Copy link
Contributor Author

I re-rebased the PR, this time making sure every single commit compiles independently (the first time I hoped that git would refuse to continue a rebase if there are still version control markers in the files, but apparently not).

Copy link
Member

@dpiparo dpiparo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the PR is works on all platforms, I propose to add a test for it and then, if everything green, just merge and close the associated item.

@silverweed silverweed force-pushed the issue7955-type-first-spec-2 branch from 6e20bb8 to 4e8a43c Compare August 16, 2024 11:30
@hahnjo
Copy link
Member

hahnjo commented Aug 16, 2024

"works on all platforms" is not really a review, but sadly I'm not sure who could properly review this... @silverweed the FIXUP commit should probably still be squashed into CreateNestedNameSpecifierForScopeOf needs specialization context...

@silverweed silverweed force-pushed the issue7955-type-first-spec-2 branch from 4e8a43c to 5f3799a Compare August 19, 2024 06:44
@vgvassilev
Copy link
Member

The original PR does not have a lot of details about what this is supposed to be doing...

@smuzaffar, can we run this PR on cmssw infrastructure?

@smuzaffar
Copy link
Contributor

@vgvassilev , cmssw tests are runing via cms-sw#208 now

@smuzaffar
Copy link
Contributor

@vgvassilev , cmssw build failed during dictionaries generation [a]. I think this mostly happens when cuda code is envolved

[a] https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8fe9c7/41033/build-logs/DataFormats/VertexSoA/log.html

0.	Program arguments: /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/rootcling -reflex -f tmp/el8_amd64_gcc12/src/DataFormats/VertexSoA/src/DataFormatsVertexSoA/a/DataFormatsVertexSoA_xr.cc -inlineInputHeader -failOnWarnings -rmf tmp/el8_amd64_gcc12/src/DataFormats/VertexSoA/src/DataFormatsVertexSoA/a/DataFormatsVertexSoA_xr.rootmap -rml libDataFormatsVertexSoA.so -m DataFormatsCommon_xr_rdict.pcm -m DataFormatsProvenance_xr_rdict.pcm -DALPAKA_DEFAULT_HOST_MEMORY_ALIGNMENT=128 -DALPAKA_DISABLE_VENDOR_RNG -DCMS_DICT_IMPL -D_REENTRANT -DGNUSOURCE -D__STRICT_ANSI__ -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=120301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DCMSSW_GIT_HASH=\"CMSSW_14_1_ROOT6_X_2024-08-19-2300\" -DPROJECT_NAME=\"CMSSW\" -DPROJECT_VERSION=\"CMSSW_14_1_ROOT6_X_2024-08-19-2300\" -Isrc -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/alpaka/1.1.0-84e4d58fde852e6641ccc23881ba7b1f/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/pcre/8.43-e34796d17981e9b6d174328c69446455/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/boost/1.80.0-7ac88d918a6883d593abc133ee0eb2e9/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/bz2lib/1.0.6-d065ccd79984efc6d4660f410e4c81de/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/libuuid/2.34-27ce4c3579b5b1de2808ea9c4cd8ed29/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tbb/v2021.9.0-2391c941213c757dc9a1835b31681235/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/xz/5.2.5-6f3f49b07db84e10c9be594a1176c114/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/zlib/1.2.11-1a082fc322b0051b504cc023f21df178/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-39786ff94f8aa2f543922cad720e1b32/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-39786ff94f8aa2f543922cad720e1b32/include/eigen3 -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-deba157dd76fed17ac8b42adc60ff53f/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/md5/1.0.0-5b594b264e04ae51e893b1d69a797ec6/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tinyxml2/6.2.0-68d511689c5dbd9a0d296bbb795fa052/include -DCMSSW_REFLEX_DICT src/DataFormats/VertexSoA/src/classes.h src/DataFormats/VertexSoA/src/classes_def.xml

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x000014bfc4093e0b in waitpid () from /lib64/libc.so.6
#1  0x000014bfc3fe7747 in do_system () from /lib64/libc.so.6
#2  0x000014bfc4c7eeff in TUnixSystem::StackTrace() () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#3  0x000014bfc4c7c9d4 in TUnixSystem::DispatchSignals(ESignals) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#4  <signal handler called>
#5  0x000014bfc5864207 in cling::utils::CreateNestedNameSpecifierForScopeOf(clang::ASTContext const&, clang::Decl const*, bool, clang::ClassTemplateSpecializationDecl const*) [clone .cold] () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#6  0x000014bfc5bf4201 in cling::utils::TypeName::GetFullyQualifiedType(clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#7  0x000014bfc5bf5e7a in cling::utils::TypeName::GetFullyQualifiedName[abi:cxx11](clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#8  0x000014bfc59383ce in ROOT::TMetaUtils::GetFullyQualifiedTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, clang::QualType const&, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#9  0x000014bfc59384c0 in ROOT::TMetaUtils::GetFullyQualifiedTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, clang::QualType const&, cling::Interpreter const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#10 0x000014bfc5a80d0d in TClingDataMemberInfo::TypeName() const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#11 0x000014bfc4c25b3d in TDataMember::Property() const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#12 0x000014bfc4c26b7a in TDataMember::Init(bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#13 0x000014bfc4c284d4 in TDataMember::TDataMember(DataMemberInfo_t*, TClass*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#14 0x000014bfc4c3311f in TListOfDataMembers::Get(DataMemberInfo_t*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#15 0x000014bfc4c33528 in TListOfDataMembers::Load() () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#16 0x000014bfc4c08c76 in TClass::CreateListOfDataMembers(std::atomic<TListOfDataMembers*>&, TDictionary::EMemberSelection, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#17 0x000014bfc4c16aba in TClass::GetDataMember(char const*) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#18 0x000014bfc4c1a7be in TBuildRealData::Inspect(TClass*, char const*, char const*, void const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#19 0x000014bfc5a17cf7 in TCling::InspectMembers(TMemberInspector&, void const*, TClass const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#20 0x000014bfc4c0bc7b in TClass::CallShowMembers(void const*, TMemberInspector&, bool) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#21 0x000014bfc5a178f5 in TCling::InspectMembers(TMemberInspector&, void const*, TClass const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#22 0x000014bfc4c0bc7b in TClass::CallShowMembers(void const*, TMemberInspector&, bool) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#23 0x000014bfc4c18864 in TClass::BuildRealData(void*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#24 0x000014bfc4c1ad27 in TBuildRealData::Inspect(TClass*, char const*, char const*, void const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#25 0x000014bfc5a17cf7 in TCling::InspectMembers(TMemberInspector&, void const*, TClass const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#26 0x000014bfc4c0bc7b in TClass::CallShowMembers(void const*, TMemberInspector&, bool) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#27 0x000014bfc5a178f5 in TCling::InspectMembers(TMemberInspector&, void const*, TClass const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#28 0x000014bfc4c0bc7b in TClass::CallShowMembers(void const*, TMemberInspector&, bool) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#29 0x000014bfc4c18864 in TClass::BuildRealData(void*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#30 0x000014bfc4c1ad27 in TBuildRealData::Inspect(TClass*, char const*, char const*, void const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#31 0x000014bfc5a17cf7 in TCling::InspectMembers(TMemberInspector&, void const*, TClass const*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#32 0x000014bfc4c0bc7b in TClass::CallShowMembers(void const*, TMemberInspector&, bool) const () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#33 0x000014bfc4c18864 in TClass::BuildRealData(void*, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#34 0x000014bfc4c3f6df in TProtoClass::TProtoClass(TClass*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#35 0x000014bfcb537148 in CloseStreamerInfoROOTFile () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libRIO.so
#36 0x000014bfc598f40f in FinalizeStreamerInfoWriting(cling::Interpreter&, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#37 0x000014bfc59a43f8 in GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#38 0x000014bfc59ae6b5 in RootClingMain(int, char**, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#39 0x000014bfc59b1d0c in ROOT_rootcling_Driver () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#40 0x000000000040115e in main ()
===========================================================

@makortel
Copy link

makortel commented Sep 4, 2024

The case @smuzaffar quoted above is actually CPU-only code (even if it uses Alpaka), so the problem is not specific to CUDA/ROCm. The full build log shows a crash also in DataFormats/Histograms package, that is completely independent from GPUs or Alpaka, and that the dictionary generation succeeds for many CUDA-dependent classes.

https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8fe9c7/41033/build-logs/DataFormats/Histograms/log.html

0.	Program arguments: /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/rootcling -reflex -f tmp/el8_amd64_gcc12/src/DataFormats/Histograms/src/DataFormatsHistograms/a/DataFormatsHistograms_xr.cc -inlineInputHeader -failOnWarnings -rmf tmp/el8_amd64_gcc12/src/DataFormats/Histograms/src/DataFormatsHistograms/a/DataFormatsHistograms_xr.rootmap -rml libDataFormatsHistograms.so -m DataFormatsCommon_xr_rdict.pcm -m DataFormatsProvenance_xr_rdict.pcm -DCMS_DICT_IMPL -D_REENTRANT -DGNUSOURCE -D__STRICT_ANSI__ -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=120301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DCMSSW_GIT_HASH=\"CMSSW_14_1_ROOT6_X_2024-08-19-2300\" -DPROJECT_NAME=\"CMSSW\" -DPROJECT_VERSION=\"CMSSW_14_1_ROOT6_X_2024-08-19-2300\" -Isrc -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/pcre/8.43-e34796d17981e9b6d174328c69446455/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/boost/1.80.0-7ac88d918a6883d593abc133ee0eb2e9/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/bz2lib/1.0.6-d065ccd79984efc6d4660f410e4c81de/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/libuuid/2.34-27ce4c3579b5b1de2808ea9c4cd8ed29/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tbb/v2021.9.0-2391c941213c757dc9a1835b31681235/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/xz/5.2.5-6f3f49b07db84e10c9be594a1176c114/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/zlib/1.2.11-1a082fc322b0051b504cc023f21df178/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-deba157dd76fed17ac8b42adc60ff53f/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/md5/1.0.0-5b594b264e04ae51e893b1d69a797ec6/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tinyxml2/6.2.0-68d511689c5dbd9a0d296bbb795fa052/include -DCMSSW_REFLEX_DICT src/DataFormats/Histograms/src/classes.h src/DataFormats/Histograms/src/classes_def.xml

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x0000148e7787ce0b in waitpid () from /lib64/libc.so.6
#1  0x0000148e777d0747 in do_system () from /lib64/libc.so.6
#2  0x0000148e78467eff in TUnixSystem::StackTrace() () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#3  0x0000148e784659d4 in TUnixSystem::DispatchSignals(ESignals) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCore.so
#4  <signal handler called>
#5  0x0000148e7904d207 in cling::utils::CreateNestedNameSpecifierForScopeOf(clang::ASTContext const&, clang::Decl const*, bool, clang::ClassTemplateSpecializationDecl const*) [clone .cold] () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#6  0x0000148e793dd201 in cling::utils::TypeName::GetFullyQualifiedType(clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#7  0x0000148e793dee7a in cling::utils::TypeName::GetFullyQualifiedName[abi:cxx11](clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#8  0x0000148e791213ce in ROOT::TMetaUtils::GetFullyQualifiedTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, clang::QualType const&, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#9  0x0000148e79134a7b in ROOT::TMetaUtils::WriteClassInit(std::ostream&, ROOT::TMetaUtils::AnnotatedRecordDecl const&, clang::CXXRecordDecl const*, cling::Interpreter const&, ROOT::TMetaUtils::TNormalizedCtxt const&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool&) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#10 0x0000148e7918cfb0 in GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType> > const&, bool, bool, bool, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#11 0x0000148e791976b5 in RootClingMain(int, char**, bool) () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#12 0x0000148e7919ad0c in ROOT_rootcling_Driver () from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-a252d5032aa4f9a2fc7dcaab3fac8b9f/bin/../lib/libCling.so
#13 0x000000000040115e in main ()
===========================================================

@makortel
Copy link

makortel commented Sep 4, 2024

Would it be helpful to repeat the test with debug symbols enabled for cling (and ROOT)?

@smuzaffar
Copy link
Contributor

Would it be helpful to repeat the test with debug symbols enabled for cling (and ROOT)?

ok, I am re-running cmssw tests with ROOT/cling debug

@smuzaffar
Copy link
Contributor

@silverweed , can you please resolve the merge conflicts ?

…ext:

Instead of picking a "random" (the first) specialization when building the name
of a non-dependent member type of a template, pick the one that corresponds to
the "current" specialization. As CreateNestedNameSpecifierForScopeOf cannot know
what's "current", this context needs to be passed down / propagated.

Add a couple of asserts that the context is provided when needed, and is a
template specialization that matches the type at hand.

This fixes root-project#7955.
@silverweed silverweed force-pushed the issue7955-type-first-spec-2 branch from 5f3799a to aa21d16 Compare September 4, 2024 15:27
@silverweed
Copy link
Contributor Author

@makortel yes, it would be quite helpful, thanks :)

@smuzaffar I rebased the PR, it should be goood now.

@vgvassilev
Copy link
Member

I think this mostly happens when cuda code is envolved

Why we put cuda in dictionaries?

@makortel
Copy link

makortel commented Sep 4, 2024

I think this mostly happens when cuda code is envolved

Why we put cuda in dictionaries?

We have classes (data products) that use CUDA (or ROCm) runtime API (no kernel calls) e.g. to manage device memory. The CMSSW framework needs some reflection information for all data product classes, and so far this reflection is achieved via ROOT dictionaries. (although we have been discussing on and off whether we'd really want to do something else for non-persistency reflection needs, also for other reasons)

@smuzaffar
Copy link
Contributor

stack trace with ROOT/Cling build with debug is below. Full build logs are available here

https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8fe9c7/41293/build-logs/CUDADataFormats/PortableTestObjects/log.html

0.	Program arguments: /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/bin/rootcling -reflex -f tmp/el8_amd64_gcc12/src/CUDADataFormats/PortableTestObjects/src/CUDADataFormatsPortableTestObjects/a/CUDADataFormatsPortableTestObjects_xr.cc -inlineInputHeader -failOnWarnings -rmf tmp/el8_amd64_gcc12/src/CUDADataFormats/PortableTestObjects/src/CUDADataFormatsPortableTestObjects/a/CUDADataFormatsPortableTestObjects_xr.rootmap -rml libCUDADataFormatsPortableTestObjects.so -m CUDADataFormatsCommon_xr_rdict.pcm -m DataFormatsPortableTestObjects_xr_rdict.pcm -m DataFormatsCommon_xr_rdict.pcm -m DataFormatsProvenance_xr_rdict.pcm -DALPAKA_DEFAULT_HOST_MEMORY_ALIGNMENT=128 -DALPAKA_DISABLE_VENDOR_RNG -DCMS_DICT_IMPL -D_REENTRANT -DGNUSOURCE -D__STRICT_ANSI__ -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=120301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DCMSSW_GIT_HASH=\"CMSSW_14_2_ROOT6_X_2024-09-03-2300\" -DPROJECT_NAME=\"CMSSW\" -DPROJECT_VERSION=\"CMSSW_14_2_ROOT6_X_2024-09-03-2300\" -Isrc -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/alpaka/1.1.0-4d4f1220bfca9be4c4149ab758d15463/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/pcre/8.43-e34796d17981e9b6d174328c69446455/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/boost/1.80.0-7ac88d918a6883d593abc133ee0eb2e9/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/bz2lib/1.0.6-d065ccd79984efc6d4660f410e4c81de/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/cuda/12.4.1-fc5cb0e72dba64b6abbf00089f3a044c/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/libuuid/2.34-27ce4c3579b5b1de2808ea9c4cd8ed29/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/include -isystem/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tbb/v2021.9.0-2391c941213c757dc9a1835b31681235/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/xz/5.2.5-6f3f49b07db84e10c9be594a1176c114/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/zlib/1.2.11-1a082fc322b0051b504cc023f21df178/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-39786ff94f8aa2f543922cad720e1b32/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/eigen/3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e-39786ff94f8aa2f543922cad720e1b32/include/eigen3 -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/fmt/10.2.1-deba157dd76fed17ac8b42adc60ff53f/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/md5/1.0.0-5b594b264e04ae51e893b1d69a797ec6/include -I/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/tinyxml2/6.2.0-68d511689c5dbd9a0d296bbb795fa052/include -DCMSSW_REFLEX_DICT src/CUDADataFormats/PortableTestObjects/src/classes.h src/CUDADataFormats/PortableTestObjects/src/classes_def.xml

 *** Break *** segmentation violation



===========================================================
There was a crash (kSigSegmentationViolation).
This is the entire stack trace of all threads:
===========================================================
#0  0x0000150890fafe0b in waitpid () from /lib64/libc.so.6
#1  0x0000150890f03747 in do_system () from /lib64/libc.so.6
#2  0x0000150891f19ebc in TUnixSystem::Exec (this=0x18586b0, shellcmd=0xb2bed80 "/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/etc/gdb-backtrace.sh 1157327 1>&2") at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/unix/src/TUnixSystem.cxx:2157
#3  0x0000150891f1a75f in TUnixSystem::StackTrace (this=0x18586b0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/unix/src/TUnixSystem.cxx:2448
#4  0x0000150891f1e19a in TUnixSystem::DispatchSignals (this=0x18586b0, sig=kSigSegmentationViolation) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/unix/src/TUnixSystem.cxx:3668
#5  0x0000150891f15fca in SigHandler (sig=kSigSegmentationViolation) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/unix/src/TUnixSystem.cxx:410
#6  0x0000150891f1e09d in sighandler (sig=11) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/unix/src/TUnixSystem.cxx:3639
#7  <signal handler called>
#8  0x0000150892f6d3c9 in llvm::ValueIsPresent<llvm::PointerUnion<clang::ClassTemplateDecl*, clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*>, void>::isPresent (t=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/include/llvm/Support/Casting.h:623
#9  0x0000150892f67c61 in llvm::detail::isPresent<llvm::PointerUnion<clang::ClassTemplateDecl*, clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*> > (t=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/include/llvm/Support/Casting.h:631
#10 0x0000150892f60abf in llvm::dyn_cast_if_present<clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*, llvm::PointerUnion<clang::ClassTemplateDecl*, clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*> > (Val=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/include/llvm/Support/Casting.h:741
#11 0x0000150892f60afc in llvm::PointerUnion<clang::ClassTemplateDecl*, clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*>::dyn_cast<clang::ClassTemplateSpecializationDecl::SpecializedPartialSpecialization*> (this=0x98) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/include/llvm/ADT/PointerUnion.h:163
#12 0x0000150897f028e6 in clang::ClassTemplateSpecializationDecl::getSpecializedTemplate (this=0x0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/clang/lib/AST/DeclTemplate.cpp:1035
#13 0x00001508934f3d9f in cling::utils::CreateNestedNameSpecifierForScopeOf (Ctx=..., decl=0x7e9a298, FullyQualified=true, Spec=0x0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1580
#14 0x00001508934f3f03 in cling::utils::CreateNestedNameSpecifierForScopeOf (Ctx=..., TypePtr=0x7e9b0a0, FullyQualified=true, Spec=0x9549268) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1621
#15 0x00001508934f4573 in cling::utils::TypeName::GetFullyQualifiedType (QT=..., Ctx=..., Spec=0x9549268) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1760
#16 0x00001508934f478e in cling::utils::TypeName::GetFullyQualifiedName[abi:cxx11](clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) (QT=..., Ctx=..., Spec=0x9549268) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1805
#17 0x0000150892e25603 in ROOT::TMetaUtils::GetFullyQualifiedTypeName (typenamestr=..., qtype=..., astContext=..., Spec=0x9549268) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:3497
#18 0x0000150892e256e6 in ROOT::TMetaUtils::GetFullyQualifiedTypeName (typenamestr=..., qtype=..., interpreter=..., Spec=0x9549268) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:3515
#19 0x00001508931b6966 in TClingDataMemberInfo::TypeName (this=0xb2bf6c0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TClingDataMemberInfo.cxx:591
#20 0x0000150893003296 in TCling::DataMemberInfo_TypeName (this=0x18e4a50, dminfo=0xb2bf6c0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:8682
#21 0x0000150891ebc9c8 in TDataMember::Property (this=0xb2bc560) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TDataMember.cxx:607
#22 0x0000150891ebae36 in TDataMember::Init (this=0xb2bc560, afterReading=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TDataMember.cxx:202
#23 0x0000150891ebad31 in TDataMember::TDataMember (this=0xb2bc560, info=0xb2bf6c0, cl=0xb2befa0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TDataMember.cxx:187
#24 0x0000150891ecd995 in TListOfDataMembers::Get (this=0xb2b4e70, info=0x98a51d0, skipChecks=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TListOfDataMembers.cxx:307
#25 0x0000150891ece0ac in TListOfDataMembers::Load (this=0xb2b4e70) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TListOfDataMembers.cxx:474
#26 0x0000150891ea0d5d in TClass::CreateListOfDataMembers (this=0xb2befa0, data=..., selection=TDictionary::EMemberSelection::kNoUsingDecls, load=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:3761
#27 0x0000150891ea0e9c in TClass::GetListOfDataMembers (this=0xb2befa0, load=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:3780
#28 0x0000150891e9fa81 in TClass::GetDataMember (this=0xb2befa0, datamember=0x7ffeced6d2d0 "elements_") at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:3456
#29 0x0000150891e94447 in TBuildRealData::Inspect (this=0x7ffeced6daa0, cl=0xb2befa0, pname=0xb2ab830 "", mname=0x7ffeced6d2d0 "elements_", add=0x0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:773
#30 0x0000150892fedfa8 in TCling::InspectMembers (this=0x18e4a50, insp=..., obj=0x0, cl=0xb2befa0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:2957
#31 0x0000150891e9baef in TClass::CallShowMembers (this=0xb2befa0, obj=0x0, insp=..., isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2225
#32 0x0000150892fee6e5 in TCling::InspectMembers (this=0x18e4a50, insp=..., obj=0x0, cl=0xb2be5a0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:3069
#33 0x0000150891e9baef in TClass::CallShowMembers (this=0xb2be5a0, obj=0x0, insp=..., isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2225
#34 0x0000150891e9afe7 in TClass::BuildRealData (this=0xb2be5a0, pointer=0x0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2080
#35 0x0000150891e949e5 in TBuildRealData::Inspect (this=0x7ffeced6e090, cl=0xb2a9130, pname=0xb2a93e0 "", mname=0x7ffeced6dcc0 "view_", add=0x70, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:886
#36 0x0000150892fedfa8 in TCling::InspectMembers (this=0x18e4a50, insp=..., obj=0x0, cl=0xb2a9130, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:2957
#37 0x0000150891e9baef in TClass::CallShowMembers (this=0xb2a9130, obj=0x0, insp=..., isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2225
#38 0x0000150891e9afe7 in TClass::BuildRealData (this=0xb2a9130, pointer=0x0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2080
#39 0x0000150891e949e5 in TBuildRealData::Inspect (this=0x7ffeced6e680, cl=0xb2a78e0, pname=0xb10ac90 "", mname=0x7ffeced6e2b0 "data_", add=0x28, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:886
#40 0x0000150892fedfa8 in TCling::InspectMembers (this=0x18e4a50, insp=..., obj=0x0, cl=0xb2a78e0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:2957
#41 0x0000150891e9baef in TClass::CallShowMembers (this=0xb2a78e0, obj=0x0, insp=..., isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2225
#42 0x0000150891e9afe7 in TClass::BuildRealData (this=0xb2a78e0, pointer=0x0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2080
#43 0x0000150891e949e5 in TBuildRealData::Inspect (this=0x7ffeced6ec70, cl=0x23c03b0, pname=0xb215680 "", mname=0x7ffeced6e8a0 "obj", add=0x8, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:886
#44 0x0000150892fedfa8 in TCling::InspectMembers (this=0x18e4a50, insp=..., obj=0x0, cl=0x23c03b0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/metacling/src/TCling.cxx:2957
#45 0x0000150891e9baef in TClass::CallShowMembers (this=0x23c03b0, obj=0x0, insp=..., isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2225
#46 0x0000150891e9afe7 in TClass::BuildRealData (this=0x23c03b0, pointer=0x0, isTransient=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TClass.cxx:2080
#47 0x0000150891ed90a6 in TProtoClass::TProtoClass (this=0xb2a3fd0, cl=0x23c03b0) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/meta/src/TProtoClass.cxx:110
#48 0x000015089ffeb40a in CloseStreamerInfoROOTFile (writeEmptyRootPCM=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/io/rootpcm/src/rootclingIO.cxx:224
#49 0x0000150892f40bf8 in FinalizeStreamerInfoWriting (interp=..., writeEmptyRootPCM=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:2645
#50 0x0000150892f41641 in GenerateFullDict (dictStream=..., interp=..., scan=..., ctorTypes=..., isSplit=false, isGenreflex=true, isSelXML=true, writeEmptyRootPCM=false) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:2804
#51 0x0000150892f4f740 in RootClingMain (argc=56, argv=0x7ffeced72a78, isGenreflex=true) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:4963
#52 0x0000150892f556bc in ROOT_rootcling_Driver (argc=56, argv=0x7ffeced72a78, config=...) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:6252
#53 0x0000000000401259 in main (argc=56, argv=0x7ffeced72a78) at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/main/src/rootcling.cxx:43

@vgvassilev
Copy link
Member

That looks like a bug in llvm... I wonder on what code it happens. I see there is a debug llvm build already. What's the way nowadays to debug it on the cms infrastructure?

@makortel
Copy link

makortel commented Sep 5, 2024

The DataFormats/Histograms dictionary generation fails with assertion failure

rootcling: /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1561: clang::NestedNameSpecifier* cling::utils::CreateNestedNameSpecifierForScopeOf(const clang::ASTContext&, const clang::Decl*, bool, const clang::ClassTemplateSpecializationDecl*): Assertion `Spec && "Cannot determine type's scope"' failed.
 #0 0x00001529359d3acc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:22
 #1 0x00001529359d3ec6 PrintStackTraceSignalHandler(void*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/lib/Support/Unix/Signals.inc:641:1
 #2 0x00001529359d19bd llvm::sys::RunSignalHandlers() /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/lib/Support/Signals.cpp:104:20
 #3 0x00001529359d34fb SignalHandler(int) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/llvm-project/llvm/lib/Support/Unix/Signals.inc:412:1
 #4 0x000015292dff2d20 __restore_rt (/lib64/libpthread.so.0+0x12d20)
 #5 0x000015292ccf652f raise (/lib64/libc.so.6+0x4e52f)
 #6 0x000015292ccc9e65 abort (/lib64/libc.so.6+0x21e65)
 #7 0x000015292ccc9d39 _nl_load_domain.cold.0 (/lib64/libc.so.6+0x21d39)
 #8 0x000015292cceee86 (/lib64/libc.so.6+0x46e86)
 #9 0x000015292f2f3d10 cling::utils::CreateNestedNameSpecifierForScopeOf(clang::ASTContext const&, clang::Decl const*, bool, clang::ClassTemplateSpecializationDecl const*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1568:65
#10 0x000015292f2f3f03 cling::utils::CreateNestedNameSpecifierForScopeOf(clang::ASTContext const&, clang::Type const*, bool, clang::ClassTemplateSpecializationDecl const*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1621:79
#11 0x000015292f2f4573 cling::utils::TypeName::GetFullyQualifiedType(clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1760:51
#12 0x000015292f2f478e cling::utils::TypeName::GetFullyQualifiedName[abi:cxx11](clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1805:42
#13 0x000015292ec25603 ROOT::TMetaUtils::GetFullyQualifiedTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, clang::QualType const&, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:3499:163
#14 0x000015292ec1c1ef CreateNameTypeMap(clang::CXXRecordDecl const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ROOT::Internal::TSchemaType, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ROOT::Internal::TSchemaType>>>&) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:1503:103
#15 0x000015292ec1d7a2 ROOT::TMetaUtils::WriteClassInit(std::ostream&, ROOT::TMetaUtils::AnnotatedRecordDecl const&, clang::CXXRecordDecl const*, cling::Interpreter const&, ROOT::TMetaUtils::TNormalizedCtxt const&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType>> const&, bool&) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:1823:40
#16 0x000015292ed411c9 GenerateFullDict(std::ostream&, cling::Interpreter&, RScanner&, std::__cxx11::list<ROOT::TMetaUtils::RConstructorType, std::allocator<ROOT::TMetaUtils::RConstructorType>> const&, bool, bool, bool, bool) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:2729:48
#17 0x000015292ed4f740 RootClingMain(int, char**, bool) /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:4963:43
#18 0x000015292ed556bc ROOT_rootcling_Driver /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/dictgen/src/rootcling_impl.cxx:6252:29
#19 0x0000000000401259 main /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/main/src/rootcling.cxx:43:51
#20 0x000015292cce27e5 __libc_start_main (/lib64/libc.so.6+0x3a7e5)
#21 0x000000000040110e _start (/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/bin/rootcling+0x40110e)

@makortel
Copy link

makortel commented Sep 5, 2024

That looks like a bug in llvm... I wonder on what code it happens. I see there is a debug llvm build already. What's the way nowadays to debug it on the cms infrastructure?

@vgvassilev cms-sw#208 (comment) shows a script that installs the (failed) CMSSW build where you can e.g. run the rootcling on the failing setup (with debug symbols in ROOT).

@smuzaffar
Copy link
Contributor

smuzaffar commented Sep 5, 2024

@vgvassilev , as @makortel mentioned above , you can do something like the following on lxplus to reproduce this build failure

#Login to lxplus and start cmssw-el8 container
> ssh lxplus
> cd cd /tmp/$(whoami)
> source /cvmfs/cms.cern.ch/cmsset_default.sh
> cmssw-el8
# Create CMSSW area using PR artefacts
> /cvmfs/cms-ci.cern.ch/week1/cms-sw/root/208/41293/install.sh
> cd CMSSW_14_2_ROOT6_X_2024-09-03-2300/
> cmsenv
#Build root dict
> scram b -v -j 10 tmp/el8_amd64_gcc12/src/DataFormats/Histograms/src/DataFormatsHistograms/a/DataFormatsHistograms_xr.cc

@makortel
Copy link

makortel commented Sep 5, 2024

The DataFormats/Histograms failure seems to occur when the rootcling is processing MEtoEDM<double>::MEtoEDMObject

@vgvassilev
Copy link
Member

@vgvassilev , as @makortel mentioned above , you can do something like the following on lxplus to reproduce this build failure

#Login to lxplus and start cmssw-el8 container
> ssh lxplus
> cd cd /tmp/$(whoami)
> source /cvmfs/cms.cern.ch/cmsset_default.sh
> cmssw-el8
# Create CMSSW area using PR artefacts
> /cvmfs/cms-ci.cern.ch/week1/cms-sw/root/208/41293/install.sh
> cd CMSSW_14_2_ROOT6_X_2024-09-03-2300/
> cmsenv
#Build root dict
> scram b -v -j 10 tmp/el8_amd64_gcc12/src/DataFormats/Histograms/src/DataFormatsHistograms/a/DataFormatsHistograms_xr.cc

I just got autowarned:

The LxPlus service is now monitoring CPU and Memory Pressure Stall
Informaton (PSI) on each node.

The LxPlus node lxplus974.cern.ch has been identified as under io pressure.
Your processes are currently the highest contributor to that pressure.

In particular, the some_avg300 value for io is 57.04% which
is over the threshold of 50%. This is the percentage of time that
resources are being wasted due to cpu context switching or thrashing memory.
This impacts all users of the service, including yourself, as your
own processes fight with one another.

@smuzaffar
Copy link
Contributor

@vgvassilev , you can use cmsdev40 to cmsdev45 nodes for testing

std::string typenameStr;

const clang::ASTContext& astContext = cl.getASTContext();
auto CTSD = llvm::dyn_cast<clang::ClassTemplateSpecializationDecl>(&cl);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this example breaks some assumptions in this PR.

#include <vector>
#include <string>
#include <stdint.h>

template <class T>
class MEtoEDM {
public:
  typedef std::vector<uint32_t> TagList;

  struct MEtoEDMObject {
    std::string name;
    TagList tags;
    T object;
  };
};

If you can reproduce that crash with a test using the example that'd be a good step forward.

#0  0x00007fffe88f652f in raise () from /lib64/libc.so.6
#1  0x00007fffe88c9e65 in abort () from /lib64/libc.so.6
#2  0x00007fffe88c9d39 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
#3  0x00007fffe88eee86 in __assert_fail () from /lib64/libc.so.6
#4  0x00007fffeaef3d10 in cling::utils::CreateNestedNameSpecifierForScopeOf (Ctx=..., decl=0x3d176f8, FullyQualified=true, Spec=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1561
#5  0x00007fffeaef3f03 in cling::utils::CreateNestedNameSpecifierForScopeOf (Ctx=..., TypePtr=0x3d17a30, FullyQualified=true, 
    Spec=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1621
#6  0x00007fffeaef4573 in cling::utils::TypeName::GetFullyQualifiedType (QT=..., Ctx=..., Spec=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1760
#7  0x00007fffeaef478e in cling::utils::TypeName::GetFullyQualifiedName[abi:cxx11](clang::QualType, clang::ASTContext const&, clang::ClassTemplateSpecializationDecl const*) (QT=..., Ctx=..., Spec=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/interpreter/cling/lib/Utils/AST.cpp:1805
#8  0x00007fffea825603 in ROOT::TMetaUtils::GetFullyQualifiedTypeName (typenamestr="", qtype=..., astContext=..., Spec=0x0)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:3497
#9  0x00007fffea81c1ef in CreateNameTypeMap (cl=..., nameType=std::map with 1 element = {...})
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7bf90/root-6.33.01/core/clingutils/src/TClingUtils.cxx:1502
#10 0x00007fffea81d7a2 in ROOT::TMetaUtils::WriteClassInit (finalString=..., cl=..., decl=0x3d5f6c8, interp=..., normCtxt=..., 
    ctorTypes=std::__cxx11::list = {...}, needCollectionProxy=@0x7ffffffef3d7: false)
    at /data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/el8_amd64_gcc12/lcg/root/6.33.01-48fd78c793bc73bd3f87499c5ca7

That is, we introduce a ClassTemplateSpecializationDecl which could be nullptr and yet we will still have a class template. In this line here we get:

(gdb) p cl.getDescribedTemplate()
$15 = (clang::TemplateDecl *) 0x0
(gdb) p cl.getDescribedClassTemplate()
$16 = (clang::ClassTemplateDecl *) 0x0
(gdb) p cl.getTemplateSpecializationKind () 
$17 = clang::TSK_ImplicitInstantiation

p cl.getInstantiatedFromMemberClass () will get us the outer class will still not be the class template specialization decl.

I think we are trying to get the template pattern of the outer class asking its nested class and that's probably not a good idea. I am not entirely sure what this pull request intends to do, looks very hacky anyways, you can probably get away by asking if the class is nested.

I think this PR is quite messy and will require a lot of work to make it consistent and mergeable.

@silverweed
Copy link
Contributor Author

@vgvassilev should I close this PR or does it make sense to keep it open?

@silverweed
Copy link
Contributor Author

@vgvassilev what should we do with this PR?

@vgvassilev
Copy link
Member

If it breaks cmssw we cannot merge it if that's the question.

@silverweed
Copy link
Contributor Author

Yes, I was wondering if we should keep pursuing this or not. If not I'll just close it rather than leaving it here unattended.

@vgvassilev
Copy link
Member

The PR claims to be fixing a bug, maybe understanding what's broken can help.

@silverweed
Copy link
Contributor Author

True, so probably it's best to restart fresh from the current state of things rather than rebasing an old fix without really understanding it like I did. That's why I would personally close this - as I'm not really the best person to do this kind of investigation at the moment.

@silverweed silverweed removed their assignment Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GetMethodWithPrototype return the incorrect function ?

8 participants