| CARVIEW |
Select Language
HTTP/2 200
date: Fri, 26 Dec 2025 19:27:03 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=280.451732,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=681.276729,nginx;desc="NGINX";dur=1.369559,glb;desc="GLB";dur=97.316648
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: aab62e3
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=OYfZdxBYm%2BDUHdSubcDiKl4zEIxj%2FqlesI2IiRc%2FXANItgMT8pddjuUjzbWrg7%2BiGU%2FfbFVlD9rEf5aemX%2Fg%2Ffwy%2BS58BbM1OCkoTAaZiYQoc%2FYs2nbFYirrdkOovTyCFbBKkgihpG1l3BgMRVEyyJT0XNyZ0CBRyD1HdHumtWRG7ioHqAaaNLAAEEDqB6zabtmIfTHHuKjiPbZ7G694iGgrufLZREDc8lnyltJHuGQhlJUUfM9%2FEdnZ%2B7M968EgzMAYO0pqUprxmDz901Jhew%3D%3D--riAfly73HurkF7BG--cUl0p7OO%2BGSCEB1Ig0Py9A%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1827685553.1766777222; Path=/; Domain=github.com; Expires=Sat, 26 Dec 2026 19:27:02 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 26 Dec 2026 19:27:02 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 96DA:36A2E5:3C60736:4832279:694EE186
Profiled program crashes when profiling virtual thread using jdk21 Β· Issue #549 Β· oracle/visualvm Β· GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Labels
Description
Describe the bug
Whenever I try to Profile the CPU for a program with virtual threads it fails with the following error:
Profiler Agent Error: GetCurrentThreadCpuTime failed with 73
Assertion failed: (res == JVMTI_ERROR_NONE), function Java_org_graalvm_visualvm_lib_jfluid_server_system_Timers_getThreadCPUTimeInNanos, file ../src-jdk15/Timers.c, line 108.
Abort trap: 6
The error code 73 corresponds to JVMTI_ERROR_UNSUPPORTED_OPERATION.
The error seems to be triggered in Timers.c:
/*
* Class: org_graalvm_visualvm_lib_jfluid_server_system_Timers
* Method: getThreadCPUTimeInNanos
* Signature: ()J
*/
JNIEXPORT jlong JNICALL Java_org_graalvm_visualvm_lib_jfluid_server_system_Timers_getThreadCPUTimeInNanos
(JNIEnv *env, jclass clz)
{
jlong threadTime;
jvmtiError res;
res = (*_jvmti)->GetCurrentThreadCpuTime(_jvmti,&threadTime);
if (res != JVMTI_ERROR_NONE) fprintf(stderr, "Profiler Agent Error: GetCurrentThreadCpuTime failed with %d\n",res);
assert(res == JVMTI_ERROR_NONE);
return threadTime;
}
Looking into the source code of jdk21 it seems that the function GetCurrentThreadCpuTime doesn't support virtual threads:
// nanos_ptr - pre-checked for null
jvmtiError
JvmtiEnv::GetCurrentThreadCpuTime(jlong* nanos_ptr) {
Thread* thread = Thread::current();
// Surprisingly the GetCurrentThreadCpuTime is used by non-JavaThread's.
if (thread->is_Java_thread()) {
if (JavaThread::cast(thread)->is_vthread_mounted()) {
// No support for a VirtualThread (yet).
return JVMTI_ERROR_UNSUPPORTED_OPERATION;
}
}
*nanos_ptr = os::current_thread_cpu_time();
return JVMTI_ERROR_NONE;
} /* end GetCurrentThreadCpuTime */
To Reproduce
- Create the following program
TriggerVisualVMProfileCrash.java:
class TriggerVisualVMProfileCrash {
public static void main(String... args) throws Exception {
System.out.println("Activate profiling and press key...");
System.in.read();
Thread.ofVirtual().start(() -> print());
}
public static void print() {
System.out.println("print() called");
}
}- Run the program in the console:
java -XX:+EnableDynamicAgentLoading -Xverify:none TriggerVisualVMProfileCrash.java-
Activate de CPU Profiler for the class
TriggerVisualVMProfileCrash:

-
Press
enterin the console so the program continues execution. -
The program will crash
Desktop (please complete the following information):
- OS: macOS
- JDK Temurin-21.0.2+13
- Version 2.1.7
whargrove, arouel, LoranceChen, dsubelman, jayaramcs and 3 more
You canβt perform that action at this time.