openpmix icon indicating copy to clipboard operation
openpmix copied to clipboard

Memory Leaks

Open ax3l opened this issue 6 years ago • 7 comments

Everything related to the latest master as of 683f7be2b6e902e05f4e08e8cd1bc2a2fac390cd: since we fixed #1275 one can address the memory leaks that got me here :-)

Here is the current log: test-suite.log.txt

Please note that those are detected with -fsanitize=address (#1265) which has an extremely low rate of false-positives (contrary to context-free analysis known from valgrind).

Developer instructions:

export CFLAGS="-fsanitize=address"
./configure
make all
make check

less test/test-suite.log

ax3l avatar May 20 '19 12:05 ax3l

@ax3l I'm not seeing any warnings from this - should we close it?

rhc54 avatar May 22 '19 16:05 rhc54

They will appear as runtime errors in make check in test/test-suite.log. I see them both locally and in #1265

E.g. in https://travis-ci.org/pmix/pmix/builds/534827754 :

  • https://api.travis-ci.org/v3/job/534827756/log.txt (gcc)
  • https://api.travis-ci.org/v3/job/534827758/log.txt (clang)

ax3l avatar May 22 '19 16:05 ax3l

Interesting - I did do a "make check" to generate the output, but I get nothing on my Mac using gcc 8.3.0 and -fsanitize=address. Perusing the logs on your Travis build, it appears they are mostly leaks being reported, which we'll address but isn't my top concern at the moment (I'm looking for memory corruption).

rhc54 avatar May 22 '19 16:05 rhc54

Interesting, on Linux I see those leaks with both clang and gcc. Did you clean the build dir so the flags were certainly passed in the configure step? I haven't spotted more corruptions but it would be wonderful if we find the leaks at some point, since this will have a nice trickle-down effect on all downstream users that try to find memory leaks in MPI-parallel applications :)

ax3l avatar May 22 '19 17:05 ax3l

No disagreement - just a question of priorities right now. I checked and the flags are definitely there. No idea why the sanitizer isn't reporting anything.

rhc54 avatar May 22 '19 17:05 rhc54

Ref Issue #1025

jjhursey avatar Dec 12 '19 22:12 jjhursey

Ref Issue #2092 which is doing a memory leak scrub. I'm leaving this issue open due to the request to add the -fsanitize=address

jjhursey avatar Mar 25 '21 14:03 jjhursey

We know that we can add that sanitize flag, and we know that PMIx will fail to pass. The issue with adding it in general is that the flag is not self-contained - you have to LD_PRELOAD the sanitizer library to use it, and the exact preload differs across systems. So let's close this as "done as much as we probably will".

rhc54 avatar Feb 08 '23 20:02 rhc54