Troubleshooting: Unavailable JVM metrics¶
If a Gradle or Kotlin Toolchain process shows OS metrics (RSS, CPU, Threads) but Heap used, Metaspace, or GC fields display — (null in JSON), inspect the sanitized probe diagnostics:
Look at the heap_probe_diagnostics array ({ "tool", "operation", "category" }).
Common diagnostic categories¶
| Category | Likely cause | Action |
|---|---|---|
missing_tool |
jcmd, jstat, or jinfo could not be found in TargetJDKDir/bin, JAVA_HOME/bin, or PATH |
Run the build on a full JDK (not a stripped JRE) or ensure a compatible JDK's bin/ directory is on PATH or in JAVA_HOME |
permission_denied |
Target JVM runs under a different user account or OS attach permissions are restricted | Run Daemonitor under the same OS user as the build process |
timeout |
Target JVM did not respond within the 750ms probe timeout (for example, during a long GC pause or extreme CPU contention) |
Wait for the next 10s probe cache cycle |
stale_pid |
Process exited or its PID was reused before the probe completed | Normal for short-lived workers |
unsupported_jdk |
Target JVM disabled attach (-XX:+DisableAttachMechanism) or uses an incompatible JDK tool version |
Check JVM flags; ensure jcmd/jstat match or are compatible with the target JDK |
parse_error |
Unexpected output format from a custom JVM distribution | Check java_vendor / java_vm_name and report the JDK distribution version |
Processes that are never JVM-probed¶
GRADLE_WRAPPER: Intentionally skipped by live heap probing (ShouldProbeLiveHeap == false).- Native Xcode processes (
XCODE_*): Not JVM processes; heap and GC fields are alwaysnull.
Sampling cadence¶
JVM probes are cached for 10s with a maximum concurrency of 2 probes at a time (daemonitor-cored). When many Gradle workers start simultaneously, some workers may populate JVM metrics on a subsequent poll cycle.