Crash without errors warning (Stack)


I wrote a code to loop over several files to extract data and put them in a TH2D.
While it seems to work perfectly on small files (<1GB), it crashes on bigger files, that can go up to 6GB, without warning and exit root. (It is supposed to draw a plot at the end)

Processing Visualise_Fluctuation3.C...
File processed/config300_ion_6_12_6_22MeV_nucl_0_deg_emp.root opened
Files closed

Here is my code Visualise_Fluctuation3.C (3.8 KB)

I tried changing the stack limit: ulimit -S -s 32768.
While allowing to go to higher energies, it still crashes at some point.

Is there some evident issue with my code? Could someone explain me a bit more how the stack works and where in my code this stack issue might come from?

Thanks in advance

ROOT Version: 6.18/04
Platform: Scientific linux

Try to use:
TString title = TString::Format("Emax Distribution %d", nParticles);
TString current_read_file_name = TString::Format("processed/config300_%s_%dMeV_nucl_%d_deg_emp.root", ion[nI].c_str(), ener[nE], angle[0]);

You should also make sure that “0 <= nI < ion.size()” and “0 <= nE < ener.size()

Then, you can use “valgrind”:
valgrind --suppressions=${ROOTSYS}/etc/valgrind-root.supp root.exe Visualise_Fluctuation3.C++g

Sorry for the delay in answering, current situation makes access to internet sometimes difficult…
While my code crash in few minutes by exiting, it is stuck for Vavlgrind it runned really slow in with valgrind and finished with a segmentation fault

valgrind --suppressions=${ROOTSYS}/etc/valgrind-root.supp --log-file="filename" root.exe -b -l -q Visualise_Fluctuation3.C

Here is the output filename.txt (65.3 KB)

Try with “valgrind ... Visualise_Fluctuation3.C++g

Here is the output from valgrind for a loop over small number of files filename.txt (19.5 KB)
And here for more files which makes root crash filename2.txt (19.5 KB)

Could you, please, specify exactly which system version and compiler (it this the default system provided one?) you are using.

I’m afraid you’ve just met a valgrind ...++g” problem.

Yes since the initial post I updated to Root 6.20/04. I am running on Scientific Linux 7.7 (Nitrogen);
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

Root was installed from root_v6.20.04.Linux-centos7-x86_64-gcc4.8.tar.gz

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.