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

OpenJDK 11 is unsupported? #218

Closed
victornoel opened this issue May 10, 2019 · 6 comments
Closed

OpenJDK 11 is unsupported? #218

victornoel opened this issue May 10, 2019 · 6 comments

Comments

@victornoel
Copy link

Hi,

I am using openjdk 11 and when trying to profile heap allocation (with -e alloc), I get the following error:

VMStructs unavailable. Unsupported JVM?

I am using it on Archlinux (which doesn't include debug symbols unfortunately, see https://bugs.archlinux.org/task/60955)

openjdk 11.0.3 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+4)
OpenJDK 64-Bit Server VM (build 11.0.3+4, mixed mode)

My process is running with the following JVM args as recommended in the README:

 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints

Is this expected or am I missing something?

@apangin
Copy link
Collaborator

apangin commented May 12, 2019

Async-profiler does support OpenJDK 11, and it is known to work on Arch Linux.
I don't have this configuration at hand right now, I'll check it a bit later.

Have you tried the most recent async-profiler built from master?

@victornoel
Copy link
Author

@apangin actually, after rebuilding the JDK with debug symbols, it worked.

Maybe the error message could be improved?

@incubos
Copy link
Contributor

incubos commented May 13, 2019

@apangin actually, after rebuilding the JDK with debug symbols, it worked.

Maybe the error message could be improved?

Actually, the error message in the application log is more specific:

WARNING: Install JVM debug symbols to improve profile accuracy

BTW, there is async-profiler package in AUR.

@incubos
Copy link
Contributor

incubos commented May 13, 2019

It looks like debug symbols are broken in the current package: https://bugs.archlinux.org/task/60955

$ gdb /usr/lib/jvm/java-11-openjdk/lib/server/libjvm.so
...
Reading symbols from /usr/lib/jvm/java-11-openjdk/lib/server/libjvm.so...
warning: the debug information found in "/usr/lib/jvm/java-11-openjdk/lib/server/libjvm.debuginfo" does not match "/usr/lib/jvm/java-11-openjdk/lib/server/libjvm.so" (CRC mismatch).

(no debugging symbols found)...done.

@victornoel
Copy link
Author

@incubos the message in the application log is not related. When you do cpu profiling for example, the message appears, but async-profiler works well (even if accuracy is improved if you have debug symbols).

My problem was with alloc profiling, which doesn't work at all without debug symbols.

Also, I already linked to the archlinux bug in the description of the current issue, we are aware of it :)

@apangin
Copy link
Collaborator

apangin commented May 13, 2019

This is true that allocation profiling requires debug symbols.
However, the profiler's error message is clear about that. For example, on CentOS or Ubuntu it prints

No AllocTracer symbols found. Are JDK debug symbols installed?

So, I believe the problem is specific to Arch Linux, and is probably related to OpenJDK build environment. Normally even stripped libjvm.so binary should contain public VMStructs symbols. Otherwise regular utilities based on Serviceability Agent (e.g. jhsdb) will not work either.

apangin added a commit that referenced this issue May 20, 2019
@apangin apangin closed this as completed May 20, 2019
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