[mpich-discuss] mpich memory leak?

Dave Goodell goodell at mcs.anl.gov
Fri Jun 8 15:11:07 CDT 2012


A few comments inline

On Jun 8, 2012, at 2:53 PM CDT, Jie Chen wrote:

> Executed with valgrid:
> 
> valgrind --leak-check=full --show-reachable=yes mpiexec -n 2 a.out

You are running valgrind on "mpiexec", not on "a.out", is that intentional?

> -----------------------------------------------------
> 
> The following is the valgrid output:
> 
> ==29174== Memcheck, a memory error detector
> ==29174== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> ==29174== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
> ==29174== Command: mpiexec -n 2 a.out
> ==29174==
> ==29174== Warning: ignored attempt to set SIGSTOP handler in sigaction();
> ==29174==          the SIGSTOP signal is uncatchable
> ==29174==

This warning about SIGSTOP indicates to me that you are also using an old version of MPICH2, since I don't think hydra has had this buggy behavior since around 1.2.1.

> ==29174== HEAP SUMMARY:
> ==29174==     in use at exit: 15 bytes in 1 blocks
> ==29174==   total heap usage: 1,052 allocs, 1,051 frees, 1,744,830 bytes allocated
> ==29174==
> ==29174== 15 bytes in 1 blocks are still reachable in loss record 1 of 1
> ==29174==    at 0x4C274A8: malloc (vg_replace_malloc.c:236)
> ==29174==    by 0x410927: ??? (in /usr/bin/mpiexec.hydra)
> ==29174==    by 0x40205A: ??? (in /usr/bin/mpiexec.hydra)
> ==29174==    by 0x548AC4C: (below main) (libc-start.c:226)

This stack trace indicates that there is a small leak (possibly harmless) in libc, not in any of the actual hydra (mpiexec) code.  Try "valgrind --leak-check=full --show-reachable=yes ls" and see if you get the same warning.  If so, then your suppressions file for your valgrind installation is probably inaccurate for some reason.

-Dave



More information about the mpich-discuss mailing list