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

Segmentation fault when trying to load table flux at TRestAxionSpectrum #3

Open
jgalan opened this issue Mar 5, 2021 · 5 comments
Open
Assignees
Labels
bug Something isn't working redesign

Comments

@jgalan
Copy link
Member

jgalan commented Mar 5, 2021

I am running into problems when loading the tabulatedSpectrum example found at examples/axionSpectrum.xml.

I do

TRestAxionSpectrum *spt = new TRestAxionSpectrum( "axionSpectrum.xml", "tabulatedSpectrum");
spt->GetDifferentialSolarAxionFlux(1.0);

And I am getting a segmentation fault.

root [1] spt->GetDifferentialSolarAxionFlux(1.0)

 *** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007f4894854ffa in __GI___waitpid (pid=15986, stat_loc=stat_loc
entry=0x7ffdf0389640, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00007f48947dc0ab in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2  0x00007f489af8d917 in TUnixSystem::StackTrace() () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#3  0x00007f489af90064 in TUnixSystem::DispatchSignals(ESignals) () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#4  <signal handler called>
#5  0x00007f4848c857d9 in AxionSpectrum::axion_flux(std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#6  0x00007f4848c85ce6 in AxionSpectrum::axion_flux(std::vector<double, std::allocator<double> >, double, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#7  0x00007f4848c85e52 in AxionSpectrum::axion_flux(double, double, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#8  0x00007f489b97a0a9 in ?? ()
#9  0x00007ffdf038c0c0 in ?? ()
#10 0x00007ffdf038c0e0 in ?? ()
#11 0x0000558efc2bd570 in ?? ()
#12 0x0000558f0134f5a0 in ?? ()
#13 0x00007ffdf038c570 in ?? ()
#14 0x3ff0000000000000 in ?? ()
#15 0x0000558efc2b4140 in ?? ()
#16 0x0000558f012ef678 in ?? ()
#17 0x00007ffdf038c570 in ?? ()
#18 0x0000558efc2b4140 in ?? ()
#19 0x00007ffdf038c570 in ?? ()
#20 0x00007f489b97a000 in ?? ()
#21 0x0000558efc2d8020 in ?? ()
#22 0x00007f488b407f1d in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#23 0x00007f488b3a4410 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#24 0x00007f488b3a5875 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#25 0x00007f488b3a5b7f in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#26 0x00007f488b448e2f in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#27 0x00007f488b32c51a in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#28 0x00007f488b34194e in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#29 0x00007f489ae39fb5 in TApplication::ProcessLine(char const*, bool, int*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#30 0x00007f4898719dce in TRint::ProcessLineNr(char const*, char const*, int*) () from /home/jgalan/apps/root-6.20.00/install/lib/libRint.so
#31 0x00007f489871a11f in TRint::HandleTermInput() () from /home/jgalan/apps/root-6.20.00/install/lib/libRint.so
#32 0x00007f489af8f52d in TUnixSystem::CheckDescriptors() () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#33 0x00007f489af908fb in TUnixSystem::DispatchOneEvent(bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#34 0x00007f489aea51c1 in TSystem::Run() () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#35 0x00007f489ae37fef in TApplication::Run(bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCore.so
#36 0x00007f489871b6a2 in TRint::Run(bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libRint.so
#37 0x0000558efb53edfb in main ()
===========================================================


The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum
Only if you are really convinced it is a bug in ROOT then please submit a
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  0x00007f4848c857d9 in AxionSpectrum::axion_flux(std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#6  0x00007f4848c85ce6 in AxionSpectrum::axion_flux(std::vector<double, std::allocator<double> >, double, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#7  0x00007f4848c85e52 in AxionSpectrum::axion_flux(double, double, double, double) () from /home/jgalan/rest-framework/source/libraries/axion/examples/../external/solarAxionFlux/lib/libaxionflux.so.0
#8  0x00007f489b97a0a9 in ?? ()
#9  0x00007ffdf038c0c0 in ?? ()
#10 0x00007ffdf038c0e0 in ?? ()
#11 0x0000558efc2bd570 in ?? ()
#12 0x0000558f0134f5a0 in ?? ()
#13 0x00007ffdf038c570 in ?? ()
#14 0x3ff0000000000000 in ?? ()
#15 0x0000558efc2b4140 in ?? ()
#16 0x0000558f012ef678 in ?? ()
#17 0x00007ffdf038c570 in ?? ()
#18 0x0000558efc2b4140 in ?? ()
#19 0x00007ffdf038c570 in ?? ()
#20 0x00007f489b97a000 in ?? ()
#21 0x0000558efc2d8020 in ?? ()
#22 0x00007f488b407f1d in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#23 0x00007f488b3a4410 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#24 0x00007f488b3a5875 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#25 0x00007f488b3a5b7f in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#26 0x00007f488b448e2f in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
#27 0x00007f488b32c51a in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) () from /home/jgalan/apps/root-6.20.00/install/lib/libCling.so
===========================================================
@jgalan jgalan added the bug Something isn't working label Mar 5, 2021
@jgalan
Copy link
Member Author

jgalan commented Mar 5, 2021

Everything is now in master branch.

I have added a small change on TRestAxionSpectrum so that it would pass the full path to AxionSpectrum class.

At the following commit be84d3a

@sebhoof
Copy link
Member

sebhoof commented Mar 9, 2021

The Framework currently uses the archived, outdated LFNA version of axionlib; is this intentional? I guess I could clone a stand-alone version of the Github axionlib repo to reproduce the bug, but I'd have to install a separate version of REST and and link to the standalone repo the way it used to be done. I think it would be easier get the submodule from Github instead of LFNA now, which would make it easier to fix/redesign this?

@jgalan
Copy link
Member Author

jgalan commented Mar 9, 2021

I updated the development branch to point the github axionlib repository. This is done here rest-for-physics/framework@30b4091.

However, it seems it is not straight forward to update it locally, and I recommend to re-clone from scratch and pull submodules again, because the submodule URL is hardcoded at .git/config. I believe it is also possible to update manually.

I opened a post about that here http://ezpc10.unizar.es/t/restaxionlib-library-was-moved-to-github/450

@jgalan
Copy link
Member Author

jgalan commented Mar 9, 2021

I see also that this issue is connected with the following forum post: http://ezpc10.unizar.es/t/using-the-previous-existing-solar-models-definitions-in-the-new-solaraxionlib-scheme/353

@sebhoof
Copy link
Member

sebhoof commented Mar 9, 2021

I opened a post about that here http://ezpc10.unizar.es/t/restaxionlib-library-was-moved-to-github/450

Thanks, I missed the post; I didn't checkout the development branch initially because I thought it's all on the master.

Everything is now in master branch.

I'll try to address the forum post as well then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working redesign
Projects
None yet
Development

No branches or pull requests

2 participants