Guys,
We have been cleaning up memory leaks in MMB. I think I got all that came from MMB and molmodel, but there is a problem remaining, apparently involving OpenMM. This one is quite insidious, in that I was unable to get a location in the source. At least it is completing the calculation and not hanging. Still, it is not nice behavior and I think still dangerous. I am appending the error output from valgrind. I am coming to see you on Monday so we can discuss then if you wish.
Thank you very much for your help. Memory leaks have caused me weeks of anguish.
Sam
[samuelf@ti31 build]$ valgrind --leak-check=full ./MMB_Debug
==29613== Memcheck, a memory error detector
==29613== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==29613== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==29613== Command: ./MMB_Debug
==29613==
Usage: MMB [options]
…
/home/samuelf/svn/RNAToolbox/trunk/src/Utils.cpp:30
/home/samuelf/svn/RNAToolbox/trunk/src/RNABuilder.cpp:234
==29613== Invalid free() / delete / delete[] / realloc()
==29613== at 0x4A06016: operator delete(void*) (vg_replace_malloc.c:480)
==29613== by 0x4336F1: __gnu_cxx::new_allocator<double>::deallocate(double*, unsigned long) (new_allocator.h:110)
==29613== by 0x431F4A: std::allocator_traits<std::allocator<double> >::deallocate(std::allocator<double>&, double*, unsigned long) (alloc_traits.h:386)
==29613== by 0x430603: std::_Vector_base<double, std::allocator<double> >::_M_deallocate(double*, unsigned long) (stl_vector.h:178)
==29613== by 0x42E742: std::_Vector_base<double, std::allocator<double> >::~_Vector_base() (stl_vector.h:160)
==29613== by 0x435DB4: std::vector<double, std::allocator<double> >::~vector() (stl_vector.h:425)
==29613== by 0x3000835EBC: __cxa_finalize (in /lib64/libc-2.12.so)
==29613== by 0x51465E5: ??? (in /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib_d.so)
==29613== by 0x529E1F0: ??? (in /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib_d.so)
==29613== by 0x3000835B21: exit (in /lib64/libc-2.12.so)
==29613== by 0x300081ED63: (below main) (in /lib64/libc-2.12.so)
==29613== Address 0xa5acd00 is 0 bytes inside a block of size 512 free'd
==29613== at 0x4A06016: operator delete(void*) (vg_replace_malloc.c:480)
==29613== by 0x4336F1: __gnu_cxx::new_allocator<double>::deallocate(double*, unsigned long) (new_allocator.h:110)
==29613== by 0x431F4A: std::allocator_traits<std::allocator<double> >::deallocate(std::allocator<double>&, double*, unsigned long) (alloc_traits.h:386)
==29613== by 0x430603: std::_Vector_base<double, std::allocator<double> >::_M_deallocate(double*, unsigned long) (stl_vector.h:178)
==29613== by 0x42E742: std::_Vector_base<double, std::allocator<double> >::~_Vector_base() (stl_vector.h:160)
==29613== by 0x435DB4: std::vector<double, std::allocator<double> >::~vector() (stl_vector.h:425)
==29613== by 0x3000835B21: exit (in /lib64/libc-2.12.so)
==29613== by 0x300081ED63: (below main) (in /lib64/libc-2.12.so)
==29613==
==29613==
==29613== HEAP SUMMARY:
==29613== in use at exit: 77,583 bytes in 122 blocks
==29613== total heap usage: 446,327 allocs, 446,206 frees, 106,746,632 bytes allocated
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 29 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96E89: registerSerializationProxies (SerializationProxyRegistration.cpp:114)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 30 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96F4C: registerSerializationProxies (SerializationProxyRegistration.cpp:119)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 31 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96FC1: registerSerializationProxies (SerializationProxyRegistration.cpp:122)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 32 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97120: registerSerializationProxies (SerializationProxyRegistration.cpp:131)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 33 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97147: registerSerializationProxies (SerializationProxyRegistration.cpp:132)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 34 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97258: registerSerializationProxies (SerializationProxyRegistration.cpp:139)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 35 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E972A6: registerSerializationProxies (SerializationProxyRegistration.cpp:141)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 36 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E972CD: registerSerializationProxies (SerializationProxyRegistration.cpp:142)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 40 bytes in 1 blocks are definitely lost in loss record 37 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E972F4: registerSerializationProxies (SerializationProxyRegistration.cpp:143)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 57 (40 direct, 17 indirect) bytes in 1 blocks are definitely lost in loss record 38 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96E62: registerSerializationProxies (SerializationProxyRegistration.cpp:113)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 57 (40 direct, 17 indirect) bytes in 1 blocks are definitely lost in loss record 39 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96F25: registerSerializationProxies (SerializationProxyRegistration.cpp:118)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 57 (40 direct, 17 indirect) bytes in 1 blocks are definitely lost in loss record 40 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96FE8: registerSerializationProxies (SerializationProxyRegistration.cpp:123)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 57 (40 direct, 17 indirect) bytes in 1 blocks are definitely lost in loss record 41 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9700F: registerSerializationProxies (SerializationProxyRegistration.cpp:124)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 57 (40 direct, 17 indirect) bytes in 1 blocks are definitely lost in loss record 42 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97369: registerSerializationProxies (SerializationProxyRegistration.cpp:146)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 58 (40 direct, 18 indirect) bytes in 1 blocks are definitely lost in loss record 43 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97195: registerSerializationProxies (SerializationProxyRegistration.cpp:134)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 44 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96E14: registerSerializationProxies (SerializationProxyRegistration.cpp:111)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 45 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96E3B: registerSerializationProxies (SerializationProxyRegistration.cpp:112)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 46 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97084: registerSerializationProxies (SerializationProxyRegistration.cpp:127)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 47 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E970AB: registerSerializationProxies (SerializationProxyRegistration.cpp:128)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 48 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E970D2: registerSerializationProxies (SerializationProxyRegistration.cpp:129)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 49 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E970F9: registerSerializationProxies (SerializationProxyRegistration.cpp:130)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 50 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9716E: registerSerializationProxies (SerializationProxyRegistration.cpp:133)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 51 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E971BC: registerSerializationProxies (SerializationProxyRegistration.cpp:135)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 59 (40 direct, 19 indirect) bytes in 1 blocks are definitely lost in loss record 52 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9720A: registerSerializationProxies (SerializationProxyRegistration.cpp:137)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 60 (40 direct, 20 indirect) bytes in 1 blocks are definitely lost in loss record 53 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96F9A: registerSerializationProxies (SerializationProxyRegistration.cpp:121)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 61 (40 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 54 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96EB0: registerSerializationProxies (SerializationProxyRegistration.cpp:115)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 61 (40 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 55 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96ED7: registerSerializationProxies (SerializationProxyRegistration.cpp:116)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 61 (40 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 56 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96EFE: registerSerializationProxies (SerializationProxyRegistration.cpp:117)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 61 (40 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 57 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9705D: registerSerializationProxies (SerializationProxyRegistration.cpp:126)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 61 (40 direct, 21 indirect) bytes in 1 blocks are definitely lost in loss record 58 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9727F: registerSerializationProxies (SerializationProxyRegistration.cpp:140)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 64 (40 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 59 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E96F73: registerSerializationProxies (SerializationProxyRegistration.cpp:120)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 64 (40 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 60 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97036: registerSerializationProxies (SerializationProxyRegistration.cpp:125)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 65 (40 direct, 25 indirect) bytes in 1 blocks are definitely lost in loss record 61 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97342: registerSerializationProxies (SerializationProxyRegistration.cpp:145)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 67 (40 direct, 27 indirect) bytes in 1 blocks are definitely lost in loss record 62 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E97231: registerSerializationProxies (SerializationProxyRegistration.cpp:138)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 67 (40 direct, 27 indirect) bytes in 1 blocks are definitely lost in loss record 63 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E9731B: registerSerializationProxies (SerializationProxyRegistration.cpp:144)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 70 (40 direct, 30 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7E971E3: registerSerializationProxies (SerializationProxyRegistration.cpp:136)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== 2,883 (128 direct, 2,755 indirect) bytes in 1 blocks are definitely lost in loss record 67 of 68
==29613== at 0x4A075FC: operator new(unsigned long) (vg_replace_malloc.c:298)
==29613== by 0x7DB2C19: registerPlatforms() (Platform.cpp:64)
==29613== by 0x7DB4367: __static_initialization_and_destruction_0(int, int) (Platform.cpp:69)
==29613== by 0x7DB4383: _GLOBAL__sub_I_Platform.cpp (Platform.cpp:327)
==29613== by 0x7F4DB05: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613== by 0x7CDBA4A: ??? (in /pica/h1/samuelf/openmm/lib/libOpenMM.so)
==29613==
==29613== LEAK SUMMARY:
==29613== definitely lost: 1,568 bytes in 37 blocks
==29613== indirectly lost: 3,311 bytes in 84 blocks
==29613== possibly lost: 0 bytes in 0 blocks
==29613== still reachable: 72,704 bytes in 1 blocks
==29613== suppressed: 0 bytes in 0 blocks
==29613== Reachable blocks (those to which a pointer was found) are not shown.
==29613== To see them, rerun with: --leak-check=full --show-reachable=yes
==29613==
==29613== For counts of detected and suppressed errors, rerun with: -v
==29613== ERROR SUMMARY: 38 errors from 38 contexts (suppressed: 6 from 6)
[samuelf@ti31 build]$
memory leak
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
Re: memory leak
Hi Sam,
All of those warnings are spurious. Valgrind gets confused by global data structures. registerSerializationProxies() creates a bunch of objects and stores references to them in a global table. But Valgrind doesn't process that correctly, and thinks there are no longer any references to them.
Peter
All of those warnings are spurious. Valgrind gets confused by global data structures. registerSerializationProxies() creates a bunch of objects and stores references to them in a global table. But Valgrind doesn't process that correctly, and thinks there are no longer any references to them.
Peter
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: memory leak
Very well. But it is not just valgrind that gives me an error message. Executing on Linux actually runs to completion, but then dumps a scary error message about a corrupted double-linked list (appended below). Note that OpenMM is mentioned in the last lines of the memory map, though I don't know if that implies the error lies therein. Do you have any idea how I might find the origin of this error? I have spent weeks debugging and not gotten rid of this.
/home/samuelf/svn/RNAToolbox/trunk/src/Utils.cpp:30
/home/samuelf/svn/RNAToolbox/trunk/src/RNABuilder.cpp:234
*** glibc detected *** ./MMB: corrupted double-linked list: 0x0000000000e02810 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3000875e66]
/lib64/libc.so.6[0x3000878ca1]
/lib64/libc.so.6(__cxa_finalize+0x9d)[0x3000835ebd]
/home/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so(+0x41246)[0x2b05f5709246]
======= Memory map: ========
00400000-0040c000 r-xp 00000000 00:1f 3671264850 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/MMB
0060c000-0060d000 rw-p 0000c000 00:1f 3671264850 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/MMB
00c8f000-00efa000 rw-p 00000000 00:00 0 [heap]
3000000000-3000020000 r-xp 00000000 09:01 2883586 /lib64/ld-2.12.so
300021f000-3000220000 r--p 0001f000 09:01 2883586 /lib64/ld-2.12.so
3000220000-3000221000 rw-p 00020000 09:01 2883586 /lib64/ld-2.12.so
3000221000-3000222000 rw-p 00000000 00:00 0
3000800000-300098a000 r-xp 00000000 09:01 2883596 /lib64/libc-2.12.so
300098a000-3000b8a000 ---p 0018a000 09:01 2883596 /lib64/libc-2.12.so
3000b8a000-3000b8e000 r--p 0018a000 09:01 2883596 /lib64/libc-2.12.so
3000b8e000-3000b8f000 rw-p 0018e000 09:01 2883596 /lib64/libc-2.12.so
3000b8f000-3000b94000 rw-p 00000000 00:00 0
3000c00000-3000c02000 r-xp 00000000 09:01 2883649 /lib64/libdl-2.12.so
3000c02000-3000e02000 ---p 00002000 09:01 2883649 /lib64/libdl-2.12.so
3000e02000-3000e03000 r--p 00002000 09:01 2883649 /lib64/libdl-2.12.so
3000e03000-3000e04000 rw-p 00003000 09:01 2883649 /lib64/libdl-2.12.so
3001000000-3001083000 r-xp 00000000 09:01 2884544 /lib64/libm-2.12.so
3001083000-3001282000 ---p 00083000 09:01 2884544 /lib64/libm-2.12.so
3001282000-3001283000 r--p 00082000 09:01 2884544 /lib64/libm-2.12.so
3001283000-3001284000 rw-p 00083000 09:01 2884544 /lib64/libm-2.12.so
3001400000-3001417000 r-xp 00000000 09:01 2883610 /lib64/libpthread-2.12.so
3001417000-3001617000 ---p 00017000 09:01 2883610 /lib64/libpthread-2.12.so
3001617000-3001618000 r--p 00017000 09:01 2883610 /lib64/libpthread-2.12.so
3001618000-3001619000 rw-p 00018000 09:01 2883610 /lib64/libpthread-2.12.so
3001619000-300161d000 rw-p 00000000 00:00 0
3001c00000-3001c07000 r-xp 00000000 09:01 2883611 /lib64/librt-2.12.so
3001c07000-3001e06000 ---p 00007000 09:01 2883611 /lib64/librt-2.12.so
3001e06000-3001e07000 r--p 00006000 09:01 2883611 /lib64/librt-2.12.so
3001e07000-3001e08000 rw-p 00007000 09:01 2883611 /lib64/librt-2.12.so
2b05f5336000-2b05f5337000 rw-p 00000000 00:00 0
2b05f5338000-2b05f54b5000 r-xp 00000000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f54b5000-2b05f56b5000 ---p 0017d000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56b5000-2b05f56bf000 r--p 0017d000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56bf000-2b05f56c1000 rw-p 00187000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56c1000-2b05f56c6000 rw-p 00000000 00:00 0
2b05f56c8000-2b05f58a4000 r-xp 00000000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f58a4000-2b05f5aa3000 ---p 001dc000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f5aa3000-2b05f5aa8000 rw-p 001db000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f5aa8000-2b05f5aa9000 rw-p 00000000 00:00 0
2b05f5ab0000-2b05f5c47000 r-xp 00000000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5c47000-2b05f5e46000 ---p 00197000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5e46000-2b05f5e4d000 rw-p 00196000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5e4d000-2b05f5e4e000 rw-p 00000000 00:00 0
2b05f5e50000-2b05f684c000 r-xp 00000000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f684c000-2b05f6a4c000 ---p 009fc000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f6a4c000-2b05f6a8d000 rw-p 009fc000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f6a8d000-2b05f6a94000 rw-p 00000000 00:00 0
2b05f6a98000-2b05f723d000 r-xp 00000000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f723d000-2b05f743d000 ---p 007a5000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f743d000-2b05f745c000 rw-p 007a5000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f745c000-2b05f7462000 rw-p 00000000 00:00 0
2b05f7468000-2b05f79e2000 r-xp 00000000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f79e2000-2b05f7be2000 ---p 0057a000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f7be2000-2b05f7c0d000 rw-p 0057a000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f7c10000-2b05f7f03000 r-xp 00000000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f7f03000-2b05f8103000 ---p 002f3000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f8103000-2b05f810f000 rw-p 002f3000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f810f000-2b05f8111000 rw-p 00000000 00:00 0 Aborted (core dumped)
[samuelf@tintin2 build]$
/home/samuelf/svn/RNAToolbox/trunk/src/Utils.cpp:30
/home/samuelf/svn/RNAToolbox/trunk/src/RNABuilder.cpp:234
*** glibc detected *** ./MMB: corrupted double-linked list: 0x0000000000e02810 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3000875e66]
/lib64/libc.so.6[0x3000878ca1]
/lib64/libc.so.6(__cxa_finalize+0x9d)[0x3000835ebd]
/home/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so(+0x41246)[0x2b05f5709246]
======= Memory map: ========
00400000-0040c000 r-xp 00000000 00:1f 3671264850 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/MMB
0060c000-0060d000 rw-p 0000c000 00:1f 3671264850 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/MMB
00c8f000-00efa000 rw-p 00000000 00:00 0 [heap]
3000000000-3000020000 r-xp 00000000 09:01 2883586 /lib64/ld-2.12.so
300021f000-3000220000 r--p 0001f000 09:01 2883586 /lib64/ld-2.12.so
3000220000-3000221000 rw-p 00020000 09:01 2883586 /lib64/ld-2.12.so
3000221000-3000222000 rw-p 00000000 00:00 0
3000800000-300098a000 r-xp 00000000 09:01 2883596 /lib64/libc-2.12.so
300098a000-3000b8a000 ---p 0018a000 09:01 2883596 /lib64/libc-2.12.so
3000b8a000-3000b8e000 r--p 0018a000 09:01 2883596 /lib64/libc-2.12.so
3000b8e000-3000b8f000 rw-p 0018e000 09:01 2883596 /lib64/libc-2.12.so
3000b8f000-3000b94000 rw-p 00000000 00:00 0
3000c00000-3000c02000 r-xp 00000000 09:01 2883649 /lib64/libdl-2.12.so
3000c02000-3000e02000 ---p 00002000 09:01 2883649 /lib64/libdl-2.12.so
3000e02000-3000e03000 r--p 00002000 09:01 2883649 /lib64/libdl-2.12.so
3000e03000-3000e04000 rw-p 00003000 09:01 2883649 /lib64/libdl-2.12.so
3001000000-3001083000 r-xp 00000000 09:01 2884544 /lib64/libm-2.12.so
3001083000-3001282000 ---p 00083000 09:01 2884544 /lib64/libm-2.12.so
3001282000-3001283000 r--p 00082000 09:01 2884544 /lib64/libm-2.12.so
3001283000-3001284000 rw-p 00083000 09:01 2884544 /lib64/libm-2.12.so
3001400000-3001417000 r-xp 00000000 09:01 2883610 /lib64/libpthread-2.12.so
3001417000-3001617000 ---p 00017000 09:01 2883610 /lib64/libpthread-2.12.so
3001617000-3001618000 r--p 00017000 09:01 2883610 /lib64/libpthread-2.12.so
3001618000-3001619000 rw-p 00018000 09:01 2883610 /lib64/libpthread-2.12.so
3001619000-300161d000 rw-p 00000000 00:00 0
3001c00000-3001c07000 r-xp 00000000 09:01 2883611 /lib64/librt-2.12.so
3001c07000-3001e06000 ---p 00007000 09:01 2883611 /lib64/librt-2.12.so
3001e06000-3001e07000 r--p 00006000 09:01 2883611 /lib64/librt-2.12.so
3001e07000-3001e08000 rw-p 00007000 09:01 2883611 /lib64/librt-2.12.so
2b05f5336000-2b05f5337000 rw-p 00000000 00:00 0
2b05f5338000-2b05f54b5000 r-xp 00000000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f54b5000-2b05f56b5000 ---p 0017d000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56b5000-2b05f56bf000 r--p 0017d000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56bf000-2b05f56c1000 rw-p 00187000 00:2a 2672456404 /pica/sw/comp/gcc/5.1.0_tintin/lib64/libstdc++.so.6.0.21
2b05f56c1000-2b05f56c6000 rw-p 00000000 00:00 0
2b05f56c8000-2b05f58a4000 r-xp 00000000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f58a4000-2b05f5aa3000 ---p 001dc000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f5aa3000-2b05f5aa8000 rw-p 001db000 00:1f 3443721612 /pica/h1/samuelf/svn/RNAToolbox/trunk/build/libMMBlib.so
2b05f5aa8000-2b05f5aa9000 rw-p 00000000 00:00 0
2b05f5ab0000-2b05f5c47000 r-xp 00000000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5c47000-2b05f5e46000 ---p 00197000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5e46000-2b05f5e4d000 rw-p 00196000 00:1f 3942739571 /pica/h1/samuelf/SimTK/lib/libSimTKmolmodel.so
2b05f5e4d000-2b05f5e4e000 rw-p 00000000 00:00 0
2b05f5e50000-2b05f684c000 r-xp 00000000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f684c000-2b05f6a4c000 ---p 009fc000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f6a4c000-2b05f6a8d000 rw-p 009fc000 00:1f 703440923 /pica/h1/samuelf/SimTK/lib64/libSimTKsimbody_d.so.3.6
2b05f6a8d000-2b05f6a94000 rw-p 00000000 00:00 0
2b05f6a98000-2b05f723d000 r-xp 00000000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f723d000-2b05f743d000 ---p 007a5000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f743d000-2b05f745c000 rw-p 007a5000 00:1f 1659774063 /pica/h1/samuelf/SimTK/lib64/libSimTKmath_d.so.3.6
2b05f745c000-2b05f7462000 rw-p 00000000 00:00 0
2b05f7468000-2b05f79e2000 r-xp 00000000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f79e2000-2b05f7be2000 ---p 0057a000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f7be2000-2b05f7c0d000 rw-p 0057a000 00:1f 1198514773 /pica/h1/samuelf/SimTK/lib64/libSimTKcommon_d.so.3.6
2b05f7c10000-2b05f7f03000 r-xp 00000000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f7f03000-2b05f8103000 ---p 002f3000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f8103000-2b05f810f000 rw-p 002f3000 00:1f 445275822 /pica/h1/samuelf/openmm/lib/libOpenMM.so
2b05f810f000-2b05f8111000 rw-p 00000000 00:00 0 Aborted (core dumped)
[samuelf@tintin2 build]$
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
Re: memory leak
It's just a wild guess, but perhaps you're linking together two incompatible binaries? For example, they may have been compiled again different versions of glibc?
Peter
Peter
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: memory leak
Seems unlikely. All libraries -- OpenMM, simbody, and molmodel, are compiled on Uppmax. The Uppmax people didn't want to upgrade their glibc, so all are built using the same rather old glibc. Their argument (not entirely unreasonable) was that that glibc would not cause memory leaks, but could expose them, and the right response is to find and plug them. I'm going to see Sherm, but maybe drop by your office for a few minutes if you have the time?
Sam
Sam
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: memory leak
by the way, the program is exiting cleanly in OSX, if that is a clue.
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
Re: memory leak
The binary in question need not be something you compiled yourself. For example, perhaps CUDA or OpenCL is incompatible with the old version of glibc they have installed?
Peter
Peter
- Samuel Flores
- Posts: 189
- Joined: Mon Apr 30, 2007 1:06 pm
Re: memory leak
I am not building CUDA or OpenCL libs (cmake variable settings below).
All I really use from OpenMM is the neighborlisting, which is fast even without the GPU.
Sam
OPENMM_BUILD_AMOEBA_CUDA_LIB OFF
OPENMM_BUILD_AMOEBA_PLUGIN
ON
OPENMM_BUILD_CPU_LIB ON
OPENMM_BUILD_CUDA_COMPILER_PLU OFF
OPENMM_BUILD_CUDA_LIB OFF
OPENMM_BUILD_C_AND_FORTRAN_WRA ON
OPENMM_BUILD_DRUDE_CUDA_LIB OFF
OPENMM_BUILD_DRUDE_OPENCL_LIB OFF
OPENMM_BUILD_DRUDE_PLUGIN ON
OPENMM_BUILD_EXAMPLES OFF
OPENMM_BUILD_OPENCL_LIB OFF
OPENMM_BUILD_PME_PLUGIN ON
OPENMM_BUILD_PYTHON_WRAPPERS OFF
OPENMM_BUILD_RPMD_CUDA_LIB OFF
OPENMM_BUILD_RPMD_OPENCL_LIB OFF
OPENMM_BUILD_RPMD_PLUGIN ON
OPENMM_BUILD_SHARED_LIB ON
OPENMM_BUILD_STATIC_LIB OFF
OPENMM_GENERATE_API_DOCS OFF
All I really use from OpenMM is the neighborlisting, which is fast even without the GPU.
Sam
OPENMM_BUILD_AMOEBA_CUDA_LIB OFF
OPENMM_BUILD_AMOEBA_PLUGIN
ON
OPENMM_BUILD_CPU_LIB ON
OPENMM_BUILD_CUDA_COMPILER_PLU OFF
OPENMM_BUILD_CUDA_LIB OFF
OPENMM_BUILD_C_AND_FORTRAN_WRA ON
OPENMM_BUILD_DRUDE_CUDA_LIB OFF
OPENMM_BUILD_DRUDE_OPENCL_LIB OFF
OPENMM_BUILD_DRUDE_PLUGIN ON
OPENMM_BUILD_EXAMPLES OFF
OPENMM_BUILD_OPENCL_LIB OFF
OPENMM_BUILD_PME_PLUGIN ON
OPENMM_BUILD_PYTHON_WRAPPERS OFF
OPENMM_BUILD_RPMD_CUDA_LIB OFF
OPENMM_BUILD_RPMD_OPENCL_LIB OFF
OPENMM_BUILD_RPMD_PLUGIN ON
OPENMM_BUILD_SHARED_LIB ON
OPENMM_BUILD_STATIC_LIB OFF
OPENMM_GENERATE_API_DOCS OFF