-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i run mpi program using ASAN, asan reports some memory leaks #12584
Labels
Comments
Thanks for trying this. It looks like some of these may well be attributed to Open MPI. Most of the functions caught will only be run once in the call to |
I don't even get this far when using address sanitizer. $ cat <<EOF >> test_mpi.c
#include <mpi.h>
int main(int argc, char *argv[])
{
MPI_Init(&argc, &argv);
MPI_Finalize();
return 0;
}
EOF
$ mpicc -fsanitize=address test_mpi.c
$ gdb -ex r ./a.out
[...]
Thread 1 "a.out" received signal SIGILL, Illegal instruction.
0x00007ffff7852237 in mprotect () from /usr/lib/libasan.so.8
(gdb) bt
#0 0x00007ffff7852237 in mprotect () from /usr/lib/libasan.so.8
#1 0x00007ffff71d18af in mca_base_patcher_patch_apply_binary () from /usr/lib/libopen-pal.so.80
#2 0x00007ffff71d1997 in ?? () from /usr/lib/libopen-pal.so.80
#3 0x00007ffff71cc759 in ?? () from /usr/lib/libopen-pal.so.80
#4 0x00007ffff716e42a in mca_base_framework_components_open () from /usr/lib/libopen-pal.so.80
#5 0x00007ffff71cc228 in ?? () from /usr/lib/libopen-pal.so.80
#6 0x00007ffff716f640 in mca_base_framework_open () from /usr/lib/libopen-pal.so.80
#7 0x00007ffff71a6a3a in opal_common_ucx_mca_register () from /usr/lib/libopen-pal.so.80
#8 0x00007ffff763d60e in ?? () from /usr/lib/libmpi.so.40
#9 0x00007ffff716e42a in mca_base_framework_components_open () from /usr/lib/libopen-pal.so.80
#10 0x00007ffff76365b0 in ?? () from /usr/lib/libmpi.so.40
#11 0x00007ffff716f640 in mca_base_framework_open () from /usr/lib/libopen-pal.so.80
#12 0x00007ffff748c05c in ?? () from /usr/lib/libmpi.so.40
#13 0x00007ffff748d599 in ompi_mpi_instance_init () from /usr/lib/libmpi.so.40
#14 0x00007ffff747cd15 in ompi_mpi_init () from /usr/lib/libmpi.so.40
#15 0x00007ffff74c0364 in PMPI_Init () from /usr/lib/libmpi.so.40
#16 0x0000555555555250 in main ()
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background information
x86 centos 7.6, openmpi version: 5.0.3,gcc version: 7.3.0
CMake config:
i want to use ASAN in my code, and config -fsanitize=address in cmake setting:
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -ffunction-sections -O0 -Wall -g2 -ggdb -fsanitize=address -fsanitize-recover=address,all -fno-omit-frame-pointer -fno-stack-protector")
and my code is:
when i compile code,and then run the program, it reports some infomation:
problem
my questions are:
1.Are these memory leak issues attributed to OpenMPI? Will they affect my program?
2.If they are false positives, is there a way to suppress these issues?
Thanks。
The text was updated successfully, but these errors were encountered: