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

Problem using TRestRun to open a fresh generated file while processing data #164

Closed
jgalan opened this issue Mar 25, 2022 · 1 comment
Closed
Labels
help wanted Extra attention is needed

Comments

@jgalan
Copy link
Member

jgalan commented Mar 25, 2022

This problem appeared at rest-for-physics/axionlib#12

I suspect the problem is related to the intermediate encapsulation added by TRestAxionEventProcess::TRestEventProcess added so that we can add a common feature to any axion event process, this approach might be handy at other libraries.

When I open the file using TFile directly, I am able to access the information registered. No problem there.

The problem appears when using TRestRun *r = new TRestRun("file.root") or restRoot file.root

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007fc769f53437 in __GI___waitpid (pid=41451, stat_loc=stat_loc
entry=0x7ffdb9dcc6d8, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x00007fc769ed15df in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:149
#2  0x00007fc76c605cb3 in TUnixSystem::StackTrace() () from /programas/root/6.25.01-minuit2/lib/libCore.so
#3  0x00007fc76c6085b5 in TUnixSystem::DispatchSignals(ESignals) () from /programas/root/6.25.01-minuit2/lib/libCore.so
#4  <signal handler called>
#5  0x00007fc76afdc655 in ROOT::delete_TRandom3(void*) () from /programas/root/6.25.01-minuit2/lib/libMathCore.so
#6  0x00007fc76c00923b in TBufferFile::ReadFastArray(void**, TClass const*, int, bool, TMemberStreamer*, TClass const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#7  0x00007fc76c25171f in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, TStreamerInfo::TCompInfo* const*, int, int, int, int, int) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#8  0x00007fc76c0d3ccd in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#9  0x00007fc76c00feca in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#10 0x00007fc76c0ab944 in TKey::ReadObj() () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#11 0x00007fc76c05c170 in TDirectoryFile::Get(char const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#12 0x00007fc76c9ce8ff in TRestRun::ReadInputFileMetadata() () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#13 0x00007fc76c9d7b5a in TRestRun::OpenInputFile(TString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#14 0x00007fc76c9d7f2a in TRestRun::TRestRun(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#15 0x000055952d61a25a in main ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum https://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://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  0x00007fc76afdc655 in ROOT::delete_TRandom3(void*) () from /programas/root/6.25.01-minuit2/lib/libMathCore.so
#6  0x00007fc76c00923b in TBufferFile::ReadFastArray(void**, TClass const*, int, bool, TMemberStreamer*, TClass const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#7  0x00007fc76c25171f in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char** const&, TStreamerInfo::TCompInfo* const*, int, int, int, int, int) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#8  0x00007fc76c0d3ccd in TStreamerInfoActions::GenericReadAction(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#9  0x00007fc76c00feca in TBufferFile::ReadClassBuffer(TClass const*, void*, TClass const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#10 0x00007fc76c0ab944 in TKey::ReadObj() () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#11 0x00007fc76c05c170 in TDirectoryFile::Get(char const*) () from /programas/root/6.25.01-minuit2/lib/libRIO.so
#12 0x00007fc76c9ce8ff in TRestRun::ReadInputFileMetadata() () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#13 0x00007fc76c9d7b5a in TRestRun::OpenInputFile(TString, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#14 0x00007fc76c9d7f2a in TRestRun::TRestRun(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /home/jgalan/rest-framework/install/lib/libRestFramework.so
#15 0x000055952d61a25a in main ()
===========================================================

I will keep investigating but any help is welcome. @nkx @rest-for-physics/core_dev

@jgalan jgalan added the help wanted Extra attention is needed label Mar 25, 2022
@jgalan
Copy link
Member Author

jgalan commented Mar 25, 2022

Finally the problem was at unitialized TRandom pointer. Fixed at rest-for-physics/axionlib@a8c7ec1

@jgalan jgalan closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant