segfault in SamplerAnalysis
The IO_ROOTEVENT-rebdsim
test fails with the following segfault (http://jaiserv1.pp.rhul.ac.uk/cdash/testDetails.php?test=151366&build=1385) :
rebdsim> configuration file name : analysisConfig.txt
Config::Instance> No instance present, construct
Loading> ./output_event.root
Analysis on "Event." beginning
Event # 0 of 3Event # 1 of 3Event # 2 of 3Sampler analysis complete
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x0000003c314ac82e in waitpid () from /lib64/libc.so.6
#1 0x0000003c3143e479 in do_system () from /lib64/libc.so.6
#2 0x00007fa38759a84a in TUnixSystem::StackTrace() () at /zfs_home/accsoft/SL68/build/ROOT/v6.08.02/GCC-4.9.3-Python-2.7.12/root-6.08.02/core/unix/src/TUnixSystem.cxx:2116
#3 0x00007fa38759cf7c in TUnixSystem::DispatchSignals(ESignals) () at /zfs_home/accsoft/SL68/build/ROOT/v6.08.02/GCC-4.9.3-Python-2.7.12/root-6.08.02/core/unix/src/TUnixSystem.cxx:3661
#4 <signal handler called>
#5 0x00007fa387b9554e in SamplerAnalysis::powSumToCentralMoment(std::vector<std::vector<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >, std::allocator<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > > >, std::allocator<std::vector<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > >, std::allocator<std::vector<std::vector<double, std::allocator<double> >, std::allocator<std::vector<double, std::allocator<double> > > > > > > >&, long long, int, int, int, int) () from /nfs/scratch3/lnevay/cdash-builds/SLC68-GCC-Geant4.10.3.p01-R6-develop/analysis/librebdsimLib.so
#6 0x00007fa387b967f2 in SamplerAnalysis::Terminate(std::vector<double, std::allocator<double> >, bool) () from /nfs/scratch3/lnevay/cdash-builds/SLC68-GCC-Geant4.10.3.p01-R6-develop/analysis/librebdsimLib.so
#7 0x00007fa387ba539c in EventAnalysis::Terminate() () from /nfs/scratch3/lnevay/cdash-builds/SLC68-GCC-Geant4.10.3.p01-R6-develop/analysis/librebdsimLib.so
#8 0x00007fa387ba6dc3 in Analysis::Execute() () from /nfs/scratch3/lnevay/cdash-builds/SLC68-GCC-Geant4.10.3.p01-R6-develop/analysis/librebdsimLib.so
#9 0x0000000000403039 in main ()
===========================================================
Comments (3)
-
reporter -
- changed status to resolved
@andreyabramov and I had been working on this yesterday as we saw it on the test server. We had trouble reproducing it directly even on the same platform, which is why it wasn't solved yet.
I had a look at the code this morning and there was a shadow variable declared in the constructor. This led to an empty vector being used later. The continuous testing shows this as passing now so I'm closing this issue.
As the behaviour can sometimes be compiler dependent, I've removed the compiler flag to ignore shadow warnings and indeed there were quite a few warnings throughout the code. I've now fixed these.
I also removed the non-virtual destructor warning as that has largely been fixed a few months ago.
These changes should keep us safer in future.
-
reporter Okay great!
By the way the name is confusing, but the compiler flag -Wnon-virtual-dtor is not a "negative" flag.
- Log in to comment
Some more debug info from
gdb
: