Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7239

Crash when accessing std::vector<std::vector<int>> type branch in TTree

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TTree
    • Labels:
      None
    • Environment:

      Version 5.34/24 at lxplus@cern (lxplus0029.cern.ch)

      Description

      Dear experts,

      I would like to report a crash in a simple analysis codes.

      It occurs in accessing std::vector<std::vector<int> >
      type branch with TBranchProxy.

      Here is core dump record:

      ===========================================================
      There was a crash.
      This is the entire stack trace of all threads:
      ===========================================================
      #0  0x00007ff19eb4561e in waitpid () from /lib64/libc.so.6
      #1  0x00007ff19ead7609 in do_system () from /lib64/libc.so.6
      #2  0x00007ff19f7e7f24 in TUnixSystem::StackTrace() () from /usr/lib64/root/libCore.so.5.34
      #3  0x00007ff19f7e7343 in TUnixSystem::DispatchSignals(ESignals) () from /usr/lib64/root/libCore.so.5.34
      #4  <signal handler called>
      #5  0x00007ff19be7ce56 in TGenCollectionProxy::InitializeEx(bool) () from /usr/lib64/root/libRIO.so
      #6  0x00007ff19be7eccb in TGenCollectionStreamer::ReadBufferDefault(TBuffer&, void*, TClass const*) () from /usr/lib64/root/libRIO.so
      #7  0x00007ff19be4f2ac in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) () from /usr/lib64/root/libRIO.so
      #8  0x00007ff19bf128d1 in int TStreamerInfoActions::ReadSTL<&(TStreamerInfoActions::ReadSTLMemberWiseSameClass(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short)), &(TStreamerInfoActions::ReadSTLObjectWiseFastArray(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short, unsigned int))>(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /usr/lib64/root/libRIO.so
      #9  0x00007ff19be4b065 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /usr/lib64/root/libRIO.so
      #10 0x00007ff199e87bb9 in TBranchElement::ReadLeavesMember(TBuffer&) () from /usr/lib64/root/libTree.so
      #11 0x00007ff199e7a431 in TBranch::GetEntry(long long, int) () from /usr/lib64/root/libTree.so
      #12 0x00007ff199e89cc6 in TBranchElement::GetEntry(long long, int) () from /usr/lib64/root/libTree.so
      #13 0x00007ff197d5eed0 in ROOT::TBranchProxy::Read() () from /usr/lib64/root/libTreePlayer.so
      #14 0x00007ff1971f91d6 in ROOT::TObjProxy<std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >::GetPtr (this=0x142e410) at /usr/include/root/TBranchProxyTemplate.h:54
      #15 0x00007ff1971f7f48 in generatedSel::TStlPx_vector_int_::operator-> (this=0x142e3f8) at /afs/cern.ch/user/o/okumura/ProxyTest/./generatedSel.h:80
      #16 0x00007ff1971f8279 in generatedSel::ProxyTest_Process (this=0x142e360) at /afs/cern.ch/user/o/okumura/ProxyTest/./ProxyTest.C:19
      #17 0x00007ff1971f856c in generatedSel::Process (this=0x142e360, entry=0) at /afs/cern.ch/user/o/okumura/ProxyTest/./generatedSel.h:199
      #18 0x00007ff197d9a2c7 in TTreePlayer::Process(TSelector*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #19 0x00007ff197d9989b in TTreePlayer::Process(char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #20 0x00007ff197da5a3e in TTreePlayer::DrawScript(char const*, char const*, char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #21 0x00007ff197d9c7f6 in TTreePlayer::DrawSelect(char const*, char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #22 0x00007ff19f96aada in ?? () from /usr/lib64/root/libCore.so.5.34
      #23 0x00007ff19d8ffb99 in Cint::G__ExceptionWrapper(int (*)(G__value*, char const*, G__param*, int), G__value*, char*, G__param*, int) () from /usr/lib64/root/libCint.so.5.34
      #24 0x00007ff19d9a7e51 in G__execute_call () from /usr/lib64/root/libCint.so.5.34
      #25 0x00007ff19d9a8ca2 in G__call_cppfunc () from /usr/lib64/root/libCint.so.5.34
      #26 0x00007ff19d9879f5 in G__interpret_func () from /usr/lib64/root/libCint.so.5.34
      #27 0x00007ff19d9768a9 in G__getfunction () from /usr/lib64/root/libCint.so.5.34
      #28 0x00007ff19da5af51 in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) () from /usr/lib64/root/libCint.so.5.34
      #29 0x00007ff19da4ff8a in G__getvariable () from /usr/lib64/root/libCint.so.5.34
      #30 0x00007ff19d95499d in G__getitem () from /usr/lib64/root/libCint.so.5.34
      #31 0x00007ff19d959ca8 in G__getexpr () from /usr/lib64/root/libCint.so.5.34
      #32 0x00007ff19d9d4ad7 in G__exec_statement () from /usr/lib64/root/libCint.so.5.34
      #33 0x00007ff19d988dc9 in G__interpret_func () from /usr/lib64/root/libCint.so.5.34
      #34 0x00007ff19d976908 in G__getfunction () from /usr/lib64/root/libCint.so.5.34
      #35 0x00007ff19d95511e in G__getitem () from /usr/lib64/root/libCint.so.5.34
      #36 0x00007ff19d959ca8 in G__getexpr () from /usr/lib64/root/libCint.so.5.34
      #37 0x00007ff19d9631b8 in G__calc_internal () from /usr/lib64/root/libCint.so.5.34
      #38 0x00007ff19d9e2165 in G__process_cmd () from /usr/lib64/root/libCint.so.5.34
      #39 0x00007ff19f7a83c6 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /usr/lib64/root/libCore.so.5.34
      #40 0x00007ff19f7a5b43 in TCint::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) () from /usr/lib64/root/libCore.so.5.34
      #41 0x00007ff19f70d4a6 in TApplication::ExecuteFile(char const*, int*, bool) () from /usr/lib64/root/libCore.so.5.34
      #42 0x00007ff19f70c953 in TApplication::ProcessLine(char const*, bool, int*) () from /usr/lib64/root/libCore.so.5.34
      #43 0x00007ff19f35c821 in TRint::Run(bool) () from /usr/lib64/root/libRint.so.5.34
      #44 0x000000000040103c in main ()
      ===========================================================
       
      The lines below might hint at the cause of the crash.
      If they do not help you then please submit a bug report at
      http://root.cern.ch/bugs. Please post the ENTIRE stack trace
      from above as an attachment in addition to anything else
      that might help us fixing this issue.
      ===========================================================
      #5  0x00007ff19be7ce56 in TGenCollectionProxy::InitializeEx(bool) () from /usr/lib64/root/libRIO.so
      #6  0x00007ff19be7eccb in TGenCollectionStreamer::ReadBufferDefault(TBuffer&, void*, TClass const*) () from /usr/lib64/root/libRIO.so
      #7  0x00007ff19be4f2ac in TBufferFile::ReadFastArray(void*, TClass const*, int, TMemberStreamer*, TClass const*) () from /usr/lib64/root/libRIO.so
      #8  0x00007ff19bf128d1 in int TStreamerInfoActions::ReadSTL<&(TStreamerInfoActions::ReadSTLMemberWiseSameClass(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short)), &(TStreamerInfoActions::ReadSTLObjectWiseFastArray(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*, short, unsigned int))>(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /usr/lib64/root/libRIO.so
      #9  0x00007ff19be4b065 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /usr/lib64/root/libRIO.so
      #10 0x00007ff199e87bb9 in TBranchElement::ReadLeavesMember(TBuffer&) () from /usr/lib64/root/libTree.so
      #11 0x00007ff199e7a431 in TBranch::GetEntry(long long, int) () from /usr/lib64/root/libTree.so
      #12 0x00007ff199e89cc6 in TBranchElement::GetEntry(long long, int) () from /usr/lib64/root/libTree.so
      #13 0x00007ff197d5eed0 in ROOT::TBranchProxy::Read() () from /usr/lib64/root/libTreePlayer.so
      #14 0x00007ff1971f91d6 in ROOT::TObjProxy<std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > > >::GetPtr (this=0x142e410) at /usr/include/root/TBranchProxyTemplate.h:54
      #15 0x00007ff1971f7f48 in generatedSel::TStlPx_vector_int_::operator-> (this=0x142e3f8) at /afs/cern.ch/user/o/okumura/ProxyTest/./generatedSel.h:80
      #16 0x00007ff1971f8279 in generatedSel::ProxyTest_Process (this=0x142e360) at /afs/cern.ch/user/o/okumura/ProxyTest/./ProxyTest.C:19
      #17 0x00007ff1971f856c in generatedSel::Process (this=0x142e360, entry=0) at /afs/cern.ch/user/o/okumura/ProxyTest/./generatedSel.h:199
      #18 0x00007ff197d9a2c7 in TTreePlayer::Process(TSelector*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #19 0x00007ff197d9989b in TTreePlayer::Process(char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #20 0x00007ff197da5a3e in TTreePlayer::DrawScript(char const*, char const*, char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #21 0x00007ff197d9c7f6 in TTreePlayer::DrawSelect(char const*, char const*, char const*, long long, long long) () from /usr/lib64/root/libTreePlayer.so
      #22 0x00007ff19f96aada in ?? () from /usr/lib64/root/libCore.so.5.34
      ===========================================================
       
       
      Root > Function RunProxyTest() busy flag cleared

      To reproduce this error, I prepare a small set of codes here
      Download it and open it as

      wget https://okumura.web.cern.ch/okumura/tmp/ProxyTest.tar.gz
      tar -xzvf ProxyTest.tar.gz
      cd ProxyTest

      and generate a test TTree including std::vector<std::vector<int> > as

      root -l -b -q testRootMaker.C

      Then run analysis code, and reproduce the crash

      root -l -b -q RunProxyTest.C

      To be sure, I also cross-checked an analysis code based on
      codes given by MakeClass() function and this works fine.

      root -l -b -q RunMakeClassTest.C

      Could expert please check them?
      If there is a way to solve this issue, it would be really helpful

      Thanks a lot for your help in advance,

      Best regards,
      Yasu Okumura

        Attachments

          Activity

            People

            • Assignee:
              pcanal Philippe Canal
              Reporter:
              okumura Yasuyuki Okumura
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: