-
Notifications
You must be signed in to change notification settings - Fork 318
Profiled program crashes when profiling virtual thread using jdk21 #549
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
Comments
I just hit this same issue. Here's my full output:
This is simple to reproduce in the https://github.com/FusionAuth/java-http project using the branch |
Just ran into this issue this morning on VisualVM 2.1.10 while trying to run the JDBC profiler on an app using virtual threads: Profiler Agent Error: GetCurrentThreadCpuTime failed with 73
Assertion failed: res == JVMTI_ERROR_NONE, file ..\src-jdk15\Timers.c, line 108 I'm not sure how related it is, but there's a method with a similar name (
So, it seems like the JDK in general is currently kinda lacking in support of monitoring virtual threads. |
I’ll add a workaround to prevent the profiling from crashing, but it won’t provide thread CPU information for profiled virtual threads. |
Workaround implemented in master. The profiling of virtual threads no longer crashes profiled application. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Whenever I try to Profile the CPU for a program with virtual threads it fails with the following error:
The error code
73
corresponds to JVMTI_ERROR_UNSUPPORTED_OPERATION.The error seems to be triggered in
Timers.c
:Looking into the source code of jdk21 it seems that the function
GetCurrentThreadCpuTime
doesn't support virtual threads:To Reproduce
TriggerVisualVMProfileCrash.java
:Activate de CPU Profiler for the class

TriggerVisualVMProfileCrash
:Press
enter
in the console so the program continues execution.The program will crash
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: