[Pkg-openmpi-maintainers] Bug#732160: openmpi-common: Valgrind suppression file incomplete

Torquil Macdonald Sørensen torquil at gmail.com
Sat Dec 14 21:32:58 UTC 2013


Package: openmpi-common
Version: 1.6.5-6
Severity: normal

When checking the simple test program:

#include "mpi.h"
int main()
{
	MPI_Init(0, 0);
	MPI_Finalize();
	return 0;
}

with valgrind, it returns the following memory leak information :

$ mpiexec -n 1 valgrind --suppressions=/usr/share/openmpi/openmpi-valgrind.supp ./openmpi_valgrind.elf
==21325== Memcheck, a memory error detector
==21325== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==21325== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==21325== Command: ./openmpi_valgrind.elf
==21325==
==21325== Syscall param writev(vector[...]) points to uninitialised byte(s)
==21325==    at 0x6332937: writev (writev.c:50)
==21325==    by 0x8851312: mca_oob_tcp_msg_send_handler (in /usr/lib/openmpi/lib/openmpi/mca_oob_tcp.so)
==21325==    by 0x88524D5: mca_oob_tcp_peer_send (in /usr/lib/openmpi/lib/openmpi/mca_oob_tcp.so)
==21325==    by 0x8856335: mca_oob_tcp_send_nb (in /usr/lib/openmpi/lib/openmpi/mca_oob_tcp.so)
==21325==    by 0x8645E2E: orte_rml_oob_send (in /usr/lib/openmpi/lib/openmpi/mca_rml_oob.so)
==21325==    by 0x8646453: orte_rml_oob_send_buffer (in /usr/lib/openmpi/lib/openmpi/mca_rml_oob.so)
==21325==    by 0x8C62A5E: ??? (in /usr/lib/openmpi/lib/openmpi/mca_grpcomm_bad.so)
==21325==    by 0x50B0A6E: ompi_mpi_init (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x50C7B57: PMPI_Init (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x408E2F: main (openmpi_valgrind.cpp:5)
==21325==  Address 0x71adbb1 is 161 bytes inside a block of size 256 alloc'd
==21325==    at 0x4C2B7EE: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21325==    by 0x5137CB9: opal_dss_buffer_extend (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x513806D: opal_dss_copy_payload (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x5114DBD: orte_grpcomm_base_pack_modex_entries (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x8C6293F: ??? (in /usr/lib/openmpi/lib/openmpi/mca_grpcomm_bad.so)
==21325==    by 0x50B0A6E: ompi_mpi_init (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x50C7B57: PMPI_Init (in /usr/lib/openmpi/lib/libmpi.so.1.0.8)
==21325==    by 0x408E2F: main (openmpi_valgrind.cpp:5)
==21325==
==21325==
==21325== HEAP SUMMARY:
==21325==     in use at exit: 178,754 bytes in 597 blocks
==21325==   total heap usage: 6,838 allocs, 6,241 frees, 13,022,326 bytes allocated
==21325==
==21325== LEAK SUMMARY:
==21325==    definitely lost: 42,952 bytes in 54 blocks
==21325==    indirectly lost: 10,977 bytes in 21 blocks
==21325==      possibly lost: 0 bytes in 0 blocks
==21325==    still reachable: 124,825 bytes in 522 blocks
==21325==         suppressed: 0 bytes in 0 blocks
==21325== Rerun with --leak-check=full to see details of leaked memory
==21325==
==21325== For counts of detected and suppressed errors, rerun with: -v
==21325== Use --track-origins=yes to see where uninitialised values come from
==21325== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)

So either there are memory leaks in OpenMPI that are triggered by that test program, or the
OpenMPI Valgrind suppression file /usr/share/openmpi/openmpi-valgrind.supp is not complete.

Upstream, I see that openmpi-valgrind.supp is different between 1.6.5 and trunk, so perhaps it would
be possible to get a patched openmpi-valgrind.supp in the Debian OpenMPI package so that valgrind
stops complaining?

The newest one seems to be:

https://svn.open-mpi.org/source/xref/ompi-trunk/contrib/openmpi-valgrind.supp

but my valgrind does not seem happy with that file:

==21821== FATAL: in suppressions file "./openmpi-valgrind.supp" near line 95:
==21821==    bad or missing extra suppression info
==21821== exiting now.

Best regards
Torquil Sørensen

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information




More information about the Pkg-openmpi-maintainers mailing list