|
[Rivet] Rivet/AGILe segfault - inserted cout, now it worksAndy Buckley andy.buckley at durham.ac.ukMon Aug 11 13:06:32 BST 2008
Andy Buckley wrote: > Lars Sonnenschein wrote: >> Hello all >> the seg fault I got at CERN on the lxbuild cluster, when trying to run >> Pythia8 (from the default CERN genser installation). >> Fortran Herwig and Pythia work nicely. > > Hmm, that might be something else, e.g. the unhandled exception that James > fixed. James and Holger, try running rivetgun through valgrind to see if any > suspicious memory errors appear. I've had trouble running rivetgun through gdb > - it complains and stops on the first dlopen call, even though that works okay > outside gdb - and I suspect the problems might be related. With this command: valgrind --tool=memcheck --leak-check=full AGILE_GEN_PATH=$HOME/genserarea rivetgun -g Pythia6:418 I get this valgrind output: ==26372== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 49 from 1) ==26372== malloc/free: in use at exit: 26,248 bytes in 274 blocks. ==26372== malloc/free: 30,029 allocs, 29,755 frees, 1,723,255 bytes allocated. ==26372== For counts of detected errors, rerun with: -v ==26372== searching for pointers to 274 not-freed blocks. ==26372== checked 109,830,800 bytes. ==26372== ==26372== 16 bytes in 1 blocks are possibly lost in loss record 5 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x4427750: std::string::_Rep::_S_create(unsigned, unsigned, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.9) ==26372== by 0x44285A4: (within /usr/lib/libstdc++.so.6.0.9) ==26372== by 0x44287E2: std::string::string(std::string const&, unsigned, unsigned) (in /usr/lib/libstdc++.so.6.0.9) ==26372== by 0x4263686: AGILe::Loader::loadGenLibs(std::string const&) (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x8052964: Rivet::generate(Rivet::Configuration&, Rivet::Log&) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x80509C5: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 354 (24 direct, 330 indirect) bytes in 2 blocks are definitely lost in loss record 11 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x426A35E: AGILe::Log::getLog(std::string const&) (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425CDDD: AGILe::Loader::getLog() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425DE5B: AGILe::Loader::findGenLib(AGILe::Loader::GenLibInfo const&) (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425F54B: AGILe::Loader::_getAllGenLibInfo() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x4262DF7: AGILe::Loader::getAvailableGens() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x8058F6C: Rivet::Commandline::parseArgs(unsigned, char**) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x805041D: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 28 bytes in 1 blocks are definitely lost in loss record 14 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x433028D: LWH::AnalysisFactory::createTreeFactory() (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x42E4457: Rivet::AnalysisHandler::setupFactories(std::string, Rivet::HistoFormat) (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x42E4ABA: Rivet::AnalysisHandler::AnalysisHandler(std::string, Rivet::HistoFormat) (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x8052C1E: Rivet::generate(Rivet::Configuration&, Rivet::Log&) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x80509C5: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 910 (60 direct, 850 indirect) bytes in 5 blocks are definitely lost in loss record 24 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x432941F: Rivet::Log::getLog(std::string const&) (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x8050742: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 1,003 (184 direct, 819 indirect) bytes in 1 blocks are definitely lost in loss record 31 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x5157A35: create (in /mt/share/buckley/cedarlocal/lib/libAGILeFPythia.so.2.0.0) ==26372== by 0x425CF11: AGILe::Loader::createGen() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x8052969: Rivet::generate(Rivet::Configuration&, Rivet::Log&) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x80509C5: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 251 (76 direct, 175 indirect) bytes in 1 blocks are definitely lost in loss record 32 of 38 ==26372== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224) ==26372== by 0x432BB4D: AIDA_createAnalysisFactory (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x42E4A92: Rivet::AnalysisHandler::AnalysisHandler(std::string, Rivet::HistoFormat) (in /mt/share/buckley/cedarlocal/lib/libRivet.so.1.2.0) ==26372== by 0x8052C1E: Rivet::generate(Rivet::Configuration&, Rivet::Log&) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x80509C5: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 2,409 bytes in 73 blocks are definitely lost in loss record 35 of 38 ==26372== at 0x4022AB8: malloc (vg_replace_malloc.c:207) ==26372== by 0x426E209: MmdQ81753274112731_br_strcat (binreloc.c:674) ==26372== by 0x426E2EF: MmdQ81753274112731_br_build_path (binreloc.c:697) ==26372== by 0x426E48D: MmdQ81753274112731_br_find_lib_dir (binreloc.c:578) ==26372== by 0x426EEE2: AGILe::getLibPath() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425D64F: AGILe::Loader::findGenLib(AGILe::Loader::GenLibInfo const&) (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425F69B: AGILe::Loader::_getAllGenLibInfo() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x4262DF7: AGILe::Loader::getAvailableGens() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x8058F6C: Rivet::Commandline::parseArgs(unsigned, char**) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x805041D: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 3,672 bytes in 72 blocks are definitely lost in loss record 36 of 38 ==26372== at 0x4022AB8: malloc (vg_replace_malloc.c:207) ==26372== by 0x45264EF: strdup (strdup.c:43) ==26372== by 0x426EA79: _br_find_exe_for_symbol (binreloc.c:276) ==26372== by 0x426EB0F: MmdQ81753274112731_br_init_lib (binreloc.c:328) ==26372== by 0x426EED4: AGILe::getLibPath() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425D64F: AGILe::Loader::findGenLib(AGILe::Loader::GenLibInfo const&) (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x425F69B: AGILe::Loader::_getAllGenLibInfo() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x4262DF7: AGILe::Loader::getAvailableGens() (in /mt/share/buckley/cedarlocal/lib/libAGILe.so.2.0.0) ==26372== by 0x8058F6C: Rivet::Commandline::parseArgs(unsigned, char**) (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== by 0x805041D: main (in /mt/share/buckley/cedarlocal/bin/rivetgun) ==26372== ==26372== ==26372== 8,300 bytes in 1 blocks are definitely lost in loss record 38 of 38 ==26372== at 0x4022AB8: malloc (vg_replace_malloc.c:207) ==26372== by 0x516FE0C: _gfortrani_get_mem (memory.c:48) ==26372== by 0x51F7104: fd_to_stream (unix.c:1117) ==26372== by 0x51F6073: _gfortrani_init_units (unit.c:523) ==26372== by 0x516FCB5: init (main.c:154) ==26372== by 0x520B7EC: (within /mt/data1/herwig/lib/gcc/i686-pc-linux-gnu/4.3.1/libgfortran.so.3.0.0) ==26372== by 0x516C863: (within /mt/data1/herwig/lib/gcc/i686-pc-linux-gnu/4.3.1/libgfortran.so.3.0.0) ==26372== by 0x400D99F: call_init (in /lib/ld-2.7.so) ==26372== by 0x400DAD2: _dl_init (in /lib/ld-2.7.so) ==26372== by 0x4011783: dl_open_worker (in /lib/ld-2.7.so) ==26372== by 0x400D5D5: _dl_catch_error (in /lib/ld-2.7.so) ==26372== by 0x4010F5D: _dl_open (in /lib/ld-2.7.so) ==26372== ==26372== LEAK SUMMARY: ==26372== definitely lost: 14,753 bytes in 156 blocks. ==26372== indirectly lost: 2,174 bytes in 61 blocks. ==26372== possibly lost: 16 bytes in 1 blocks. ==26372== still reachable: 9,305 bytes in 56 blocks. ==26372== suppressed: 0 bytes in 0 blocks. ==26372== Reachable blocks (those to which a pointer was found) are not shown. ==26372== To see them, rerun with: --leak-check=full --show-reachable=yes There are definitely leaks in there that are coming from the loader functions, and the binreloc function AGILe::getLibPath() crops up a couple of times. The biggest loss comes from the last listed block, which seems entirely due to the dlopen implementation - worrying. Any ideas? Let's all have a look through the AGILe src/Loader.cc file and see if we spot anything that looks problematic. Is Rivet currently not working at Debrecen because of this problem? Andy
More information about the Rivet mailing list |