Skip to content
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

Illegal instruction: illegal operand when compiling with -fsanitize=address (openmpi 5.0.5) #12819

Open
muralidhar-nalabothula opened this issue Sep 23, 2024 · 2 comments

Comments

@muralidhar-nalabothula
Copy link

muralidhar-nalabothula commented Sep 23, 2024

Background information

What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)

v 5.0.5

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

Operating system distribution package (pacman -S openmpi)

Please describe the system on which you are running

  • Operating system/version: EndeavourOS VERSION=2024.06.25
  • Computer hardware: x86_64 (Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz)

Details of the problem

When using address sanitizer, I get Illegal instruction. (same with both gcc and clang). Please note that I donot see this error when using 4.1.6 version. This issue was mentioned previously: #12584 (comment)

#include <mpi.h>
int main(int argc, char* argv[])
{
    MPI_Init(NULL,NULL);
    MPI_Finalize();
    return 0; 
}
mpicc -g -fsanitize=address sample_prog.c
 ./a.out
 # output:
 Caught signal 4 (Illegal instruction: illegal operand)
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2532896==ERROR: AddressSanitizer: SEGV on unknown address 0x7368917f1000 (pc 0x7368917f1000 bp 0x736892049050 sp 0x736892049020 T0)
==2532896==The signal is caused by a READ memory access.
==2532896==Hint: PC is at a non-executable region. Maybe a wild jump?
    #0 0x7368917f1000  (<unknown module>)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>) 
==2532896==ABORTING

'''gdb output```

[New Thread 0x7ffff36006c0 (LWP 2533116)]

Thread 1 "a.out" received signal SIGILL, Illegal instruction.
0x00007ffff78526b7 in mprotect () from /usr/lib/libasan.so.8
@rhc54
Copy link
Contributor

rhc54 commented Sep 23, 2024

I don't see anything usable in that error output - an "illegal instruction somewhere in the code" is impossible to track down. Any chance you can localize that a bit?

@bosilca
Copy link
Member

bosilca commented Sep 23, 2024

The culprit seems to be mprotect () from /usr/lib/libasan.so.8, that's not something this community we can fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants