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

Segmentation fault #47

Closed
ksangeet990 opened this issue Jul 2, 2021 · 9 comments
Closed

Segmentation fault #47

ksangeet990 opened this issue Jul 2, 2021 · 9 comments

Comments

@ksangeet990
Copy link

ksangeet990 commented Jul 2, 2021

Hi,

Running the instr_count tool with
LD_PRELOAD=<path to nvbit tool>,/usr/lib/x86_64-linux-gnu/libstdc++.so.6 <your app> giving segmentation fault.

@x-y-z
Copy link
Collaborator

x-y-z commented Jul 6, 2021

Can you give more detail information? Sorry, I am not able to reproduce it. Also, according to ld.so manpage, LD_PRELOAD accepts a list of objects separated by whitespace or colons. I am not sure the command you gave would work.

@ksangeet990
Copy link
Author

ksangeet990 commented Jul 6, 2021

Hi @x-y-z,

Running the instr_count tool on Ubuntu 14.04, experienced the symbol lookup error issue.
./test-apps/vectoradd/vectoradd: symbol lookup error: ./tools/instr_count/instr_count.so: undefined symbol: _ZTVNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE.
To mitigate the issue, followed steps in #3 to add
libstdc++.so.6 from ubuntu 16.04 but faced with the segmentation fault error.
Let me know if you need any more information.
PS Command used:
LD_PRELOAD=<path to nvbit tool> /usr/lib/x86_64-linux-gnu/libstdc++.so.6 <your app>

@x-y-z
Copy link
Collaborator

x-y-z commented Jul 6, 2021

This method works for me locally. I ran vectoradd in Ubuntu 14.04+CUDA8.0 with instr_count.so compiled with nvcc 11.2 and libstdc++.so.6 copied from Ubuntu 20.04.

Maybe you can try libstdc++.so.6 from Ubuntu 20.04.

@ksangeet990
Copy link
Author

ksangeet990 commented Jul 6, 2021

As suggested by you, I ran the tool with libstdc++.so.6 from Ubuntu 20.04 loaded using LD_PRELOAD. Still getting the segmentation fault. Any more suggestions that I could try out?

@x-y-z
Copy link
Collaborator

x-y-z commented Jul 6, 2021

I think you should check your machine's dmesg to see which part of the code causing the segmentation fault.

@ksangeet990
Copy link
Author

ksangeet990 commented Jul 7, 2021

It's giving me this, any pointers?
instr_count.so[11624]: segfault at 0 ip 00007fb8c24f3361 sp 00007ffca35f6768 error 4 in instr_count.so[7fb8c24de000+e1000].
P.S. Also using nvbit 1.4 release

@x-y-z
Copy link
Collaborator

x-y-z commented Jul 7, 2021

What nvcc version were you using to compile instr_count.so? I used nvcc 11.0 and 11.2 to compile instr_count.so, both worked without any issue.

@ksangeet990
Copy link
Author

I am using nvcc 11.2 to compile both instr_count.so and vectoradd. gcc/g++ version is 5.5.0

@ksangeet990
Copy link
Author

nvm, got it worked. Was invoking with incorrectly formatted LD_PRELOAD. Thank you for the help.

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

2 participants