MultiIndexedHitContainer include causes ROOT issues in LoKi with gcc12 lcg 104/105 builds
In a development, we wanted to add an include to our track model, specifically Track_v1.h
.
However, after debugging, it seems that adding #include "Kernel/MultiIndexedContainer.h"
is enough to stop LoKi from working. An example of the error log is presented in this test result under e.g. lokicore0: https://lhcb-nightlies.web.cern.ch/nightly/lhcb-master-mr/10286/LHCb/x86_64_v3-el9-gcc12+cuda12_1-opt+g/tests
The problem is not there for builds with gcc13 or gcc12-lcg103.
In case it helps, the last message printed before the segfault (locally) is:
python3: /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/interpreter/llvm/src/tools/clang/lib/AST/DeclCXX.cpp:1499: clang::NamedDecl* getLambdaCallOperatorHelper(const clang::CXXRecordDecl&): Assertion `!Calls.empty() && "Missing lambda call operator!"' failed.
Running with CLING_DEBUG=1
as environment setting gives only slightly more information (i.e. it goes wrong trying to resolve the dependences of the Particle):
#0 0x00007f098bf1819a in wait4 () from /lib64/libc.so.6
#1 0x00007f098be618fb in do_system () from /lib64/libc.so.6
#2 0x00007f0989668b30 in TUnixSystem::Exec (this=0x1548020, shellcmd=0x5bdfd270 "/cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/etc/gdb-backtrace.sh 2306814 1>&2") at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/unix/src/TUnixSystem.cxx:2104
#3 0x00007f09896693d1 in TUnixSystem::StackTrace (this=0x1548020) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/unix/src/TUnixSystem.cxx:2395
#4 0x00007f0973eb8594 in (anonymous namespace)::do_trace (sig=5) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:182
#5 0x00007f0973eb8610 in (anonymous namespace)::TExceptionHandlerImp::HandleException (this=0x5e2cda0, sig=5) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:195
#6 0x00007f098966cdb9 in TUnixSystem::DispatchSignals (this=0x1548020, sig=kSigAbort) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/unix/src/TUnixSystem.cxx:3610
#7 0x00007f0989664d04 in SigHandler (sig=kSigAbort) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/unix/src/TUnixSystem.cxx:395
#8 0x00007f098966cd0f in sighandler (sig=6) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/unix/src/TUnixSystem.cxx:3586
#9 <signal handler called>
#10 0x00007f098bea154c in __pthread_kill_implementation () from /lib64/libc.so.6
#11 0x00007f098be54ce6 in raise () from /lib64/libc.so.6
#12 0x00007f098be287f3 in abort () from /lib64/libc.so.6
#13 0x00007f098be2871b in __assert_fail_base.cold () from /lib64/libc.so.6
#14 0x00007f098be4dc66 in __assert_fail () from /lib64/libc.so.6
#15 0x00007f0985272b92 in getLambdaCallOperatorHelper(clang::CXXRecordDecl const&) [clone .part.0] () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#16 0x00007f098527373b in clang::CXXRecordDecl::getLambdaCallOperator() const () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#17 0x00007f09824eaf68 in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseLambdaExpr(clang::LambdaExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*> > > >*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#18 0x00007f09824e6bc5 in clang::RecursiveASTVisitor<cling::(anonymous namespace)::StaticVarCollector>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*> > > >*) [clone .constprop.0] () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#19 0x00007f09824e7136 in cling::DeclUnloader::VisitFunctionDecl(clang::FunctionDecl*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#20 0x00007f09824e7d12 in cling::DeclUnloader::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#21 0x00007f09824e83e5 in cling::DeclUnloader::VisitDeclContext(clang::DeclContext*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#22 0x00007f09824e8f9b in cling::DeclUnloader::VisitRecordDecl(clang::RecordDecl*) [clone .part.0] () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#23 0x00007f09824e817d in cling::DeclUnloader::VisitDeclContext(clang::DeclContext*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#24 0x00007f09824e6d7f in cling::DeclUnloader::VisitFunctionDecl(clang::FunctionDecl*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#25 0x00007f09824b02a4 in cling::TransactionUnloader::unloadDeserializedDeclarations(cling::Transaction*, cling::DeclUnloader&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#26 0x00007f09824b0692 in cling::TransactionUnloader::RevertTransaction(cling::Transaction*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#27 0x00007f0982494f7d in cling::Interpreter::unload(cling::Transaction&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#28 0x00007f098251ffa8 in cling::IncrementalParser::commitTransaction(llvm::PointerIntPair<cling::Transaction*, 2u, cling::IncrementalParser::EParseResult, llvm::PointerLikeTypeTraits<cling::Transaction*>, llvm::PointerIntPairInfo<cling::Transaction*, 2u, llvm::PointerLikeTypeTraits<cling::Transaction*> > >&, bool) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#29 0x00007f0982522dd8 in cling::IncrementalParser::Compile(llvm::StringRef, cling::CompilationOptions const&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#30 0x00007f0982492014 in cling::Interpreter::parseForModule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#31 0x00007f098226dbda in ExecAutoParse (what=0x7f09580825b8 "\n#line 1 \"PhysEventDict dictionary payload\"\n\n#ifndef GAUDI_DICTIONARY\n #define GAUDI_DICTIONARY 1\n#endif\n#ifndef GAUDI_V20_COMPAT\n #define GAUDI_V20_COMPAT 1\n#endif\n#ifndef USE_DD4HEP\n #define USE_"..., header=false, interpreter=0x13d9180) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TCling.cxx:6318
#32 0x00007f098226e463 in TCling::AutoParseImplRecurse (this=0x144ac90, cls=0x7ffecee111e0 "LHCb::Particle", topLevel=true) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TCling.cxx:6423
#33 0x00007f098226eae3 in TCling::AutoParse (this=0x144ac90, cls=0x7ffecee111e0 "LHCb::Particle") at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TCling.cxx:6508
#34 0x00007f0982254350 in TCling__AutoParseCallback (className=0x7ffecee111e0 "LHCb::Particle") at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TCling.cxx:628
#35 0x00007f09823f8129 in TClingCallbacks::LookupObject (this=0x28def30, Tag=0x38a4810) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TClingCallbacks.cxx:596
#36 0x00007f098249b5bc in cling::MultiplexInterpreterCallbacks::LookupObject(clang::TagDecl*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#37 0x00007f0983051150 in clang::MultiplexExternalSemaSource::CompleteType(clang::TagDecl*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#38 0x00007f09838e3897 in clang::Sema::RequireCompleteTypeImpl(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser*) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#39 0x00007f09838e4145 in clang::Sema::RequireCompleteType(clang::SourceLocation, clang::QualType, clang::Sema::CompleteTypeKind, clang::Sema::TypeDiagnoser&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#40 0x00007f09830afdd0 in clang::Sema::RequireCompleteDeclContext(clang::CXXScopeSpec&, clang::DeclContext*&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#41 0x00007f09824a204d in cling::getCompleteContext(clang::Decl const*, clang::ASTContext&, clang::Sema&) () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#42 0x00007f09824a61db in cling::LookupHelper::findScope(llvm::StringRef, cling::LookupHelper::DiagSetting, clang::Type const**, bool) const () from /cvmfs/lhcb.cern.ch/lib/lcg/releases/ROOT/6.28.04-740f6/x86_64-el9-gcc12-dbg/lib/libCling.so
#43 0x00007f098241d054 in TClingClassInfo::TClingClassInfo (this=0x7ffecee11d00, interp=0x13d9180, name=0x7ffecee11e50 "LHCb::Particle", intantiateTemplate=true) at /build/jenkins/workspace/lcg_release_pipeline/build/projects/ROOT-6.28.04/src/ROOT/6.28.04/core/metacling/src/TClingClassInfo.cxx:88
A workaround would be to move the declaration for this specific container for FTLiteClusters to a dedicated file, and not include that in the Track_v1.h. But ideally we find the fix for the problem.