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

Problem loading libasyncprofiler.so on Corretto-17.0.7.7.1 #749

Closed
v-thakkar opened this issue May 15, 2023 · 2 comments
Closed

Problem loading libasyncprofiler.so on Corretto-17.0.7.7.1 #749

v-thakkar opened this issue May 15, 2023 · 2 comments

Comments

@v-thakkar
Copy link

I'm trying to load libasyncprofiler.so via a command like the following:

/path/to/jattach <java_pid> load /path/to/libasyncProfiler.so true start,event=cpu,file=prof.jfr but it fails and returns code 200. Is there a way to get more information about the exact error here? I've attached the strace output of the same but to me it seems like the command is doing everything correctly (unless I overlooked something).

The surprising thing for me is that it works perfectly fine on the host with the same openjdk and glibc version. So wondering if there is something specific in libasyncProfiler.so where things are going wrong? Is there a way to get more information about the JVM return code?
strace_log_ghaction.txt

JFYI, I'm using the release binaries from v2.9. Thanks!

@apangin
Copy link
Collaborator

apangin commented May 15, 2023

Return code 200 means there was an error in executing profiler command.
The exact error message is printed to stdout of the JVM process.
To redirect the error output to a file, add log=/path/to/profiler.log option.

I guess in your case the problem is in directory permissions: profiler fails to create prof.jfr. Try specifying the full path to the output file.

@v-thakkar
Copy link
Author

Thanks, I somehow missed that there is a log option as well. :)

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