ofi-cray / libfabric-cray

Open Fabric Interfaces
http://ofiwg.github.io/libfabric/
Other
16 stars 9 forks source link

Memory leak in gnix_domain_open from mr_cache_info alloc #1425

Closed soumagne closed 6 years ago

soumagne commented 6 years ago

The memory allocated for mr_cache_info in gnix_domain_open() is not released in _domain_destruct(). See report below:

Direct leak of 12288 byte(s) in 1 object(s) allocated from:
    #0 0x2aaaaad92e20 in __interceptor_calloc ../../../../cray-gcc-6.3.0-201701050407.93fe37becc347/libsanitizer/asan/asan_malloc_linux.cc:70
    #1 0x2aaaac97be0f in gnix_domain_open prov/gni/src/gnix_dom.c:600
    #2 0x2aaaac2ce178 in fi_domain /global/u2/j/jsoumagn/apps/libfabric/1.5.3/include/rdma/fi_domain.h:231
    #3 0x2aaaac2d1995 in na_ofi_domain_open /global/homes/j/jsoumagn/workspace/mercury/source/src/na/na_ofi.c:1185
    #4 0x2aaaac2d4894 in na_ofi_initialize /global/homes/j/jsoumagn/workspace/mercury/source/src/na/na_ofi.c:1797
    #5 0x2aaaac2c8325 in NA_Initialize_opt /global/homes/j/jsoumagn/workspace/mercury/source/src/na/na.c:377
    #6 0x40cbce in NA_Test_init /global/homes/j/jsoumagn/workspace/mercury/source/Testing/na/na_test.c:402
    #7 0x40588d in HG_Test_init /global/homes/j/jsoumagn/workspace/mercury/source/Testing/mercury_test.c:313
    #8 0x402da7 in main /global/homes/j/jsoumagn/workspace/mercury/source/Testing/test_server.c:59
    #9 0x2aaaad25b6e4 in __libc_start_main (/lib64/libc.so.6+0x206e4)
soumagne commented 6 years ago

This is both in master and 1.5.x branches

hppritcha commented 6 years ago

@soumagne please start opening issues for GNI provider on the upstream repo. Thanks.

soumagne commented 6 years ago

@hppritcha sure ok thanks will do that in the future!