Problem 1413 - Apparent memory leak in the simulation of nucleus-nucleus interactions
Summary: Apparent memory leak in the simulation of nucleus-nucleus interactions
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic (show other problems)
Version: 9.6
Hardware: All All
: P5 normal
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2012-12-21 09:40 CET by Luciano Pandola
Modified: 2013-01-17 19:14 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Luciano Pandola 2012-12-21 09:40:55 CET
The memory usage of my application (which ran fine with Geant4 9.5) largely increases during the running time, until the machine runs out of memory and the code crashes. The application is tailored to the simulation of C12+C12 interactions at about 60 MeV/n. As mentioned above, no problems where observed with the same application code when compiled with Geant4 9.5 (and earlier).

According to the gdb report (which is issued when the machine runs out of memory) last memory allocation comes from G4CrossSectionDataStore() and G4GGNuclNuclCrossSection(). (see the log below). 

The leak is observed also in the (development) reference tag geant4-09-06-ref-01.

Luciano


#0  0x00a7a402 in __kernel_vsyscall ()
#1  0x001f5159 in raise () from /lib/libc.so.6
#2  0x001f66e3 in abort () from /lib/libc.so.6
#3  0x0313c550 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstd
c++.so.6
#4  0x03139f75 in std::set_unexpected () from /usr/lib/libstdc++.so.6
#5  0x03139fb2 in std::terminate () from /usr/lib/libstdc++.so.6
#6  0x0313a0ea in __cxa_throw () from /usr/lib/libstdc++.so.6
#7  0x0313a52e in operator new () from /usr/lib/libstdc++.so.6
#8  0x0313a60d in operator new[] () from /usr/lib/libstdc++.so.6
#9  0x08adca57 in G4AllocatorPool::Grow ()
#10 0x0830c8ed in G4GGNuclNuclCrossSection::GetZandACrossSection ()
#11 0x0855a62d in G4CrossSectionDataStore::GetCrossSection ()
#12 0x0855aab9 in G4CrossSectionDataStore::GetCrossSection ()
#13 0x083284f6 in G4HadronicProcess::GetMeanFreePath ()
#14 0x084b1f25 in G4VDiscreteProcess::PostStepGetPhysicalInteractionLength ()
#15 0x082a9775 in G4SteppingManager::DefinePhysicalStepLength ()
#16 0x082a7f45 in G4SteppingManager::Stepping ()
#17 0x082a038d in G4TrackingManager::ProcessOneTrack ()
#18 0x0827bd95 in G4EventManager::DoProcessing ()
#19 0x0825c11c in G4RunManager::ProcessOneEvent ()
#20 0x0825b794 in G4RunManager::DoEventLoop ()
#21 0x0825d435 in G4RunManager::BeamOn ()
#22 0x08265b49 in G4RunMessenger::SetNewValue ()
#23 0x08abc160 in G4UIcommand::DoIt ()
#24 0x08ac67b8 in G4UImanager::ApplyCommand ()
#25 0x0822b8fc in G4UIterminal::ExecuteCommand ()
#26 0x0822cfdc in G4UIterminal::SessionStart ()
#27 0x0804e8e9 in main ()
Comment 1 dennis.herbert.wright 2013-01-10 19:34:55 CET
A possible solution has been found.  Testing is underway.
Comment 2 dennis.herbert.wright 2013-01-17 19:14:36 CET
The leak has been fixed and tested by Alberto Ribon.  The solution will be included in the next Geant4 patch.