fix: make thread dumps actually contain the process you want - #649
Merged
Conversation
`ChildProcessDiagnostics` backs two existing features — Ctrl-T (SIGINFO) in the
client and the dump the compile server writes at shutdown — and three separate
bugs meant both could produce a dump that looked fine and was missing the point.
All three are silent: an incomplete dump is indistinguishable from a dump of a
healthy process.
- `findJstack` only ever tried `bin/jstack`, never `jstack.exe`, so it found
nothing on WINDOWS at all — including in the server, which is the platform
and the process whose hangs are worth reading.
- it looked only under `java.home`. The client is a GraalVM native image with
no JDK of its own, so the property is absent or points somewhere without a
`bin/jstack`, and the client could never dump a child process anywhere. It
now takes JVM bin directories from the caller, which knows a real one.
- `dumpAll` walked only `ProcessHandle.current().descendants()`. A shared
compile server was spawned by whichever client started it, possibly days
ago, so it is nobody's descendant — meaning the dump reliably omitted the
one process actually doing the work. Callers can now name extra pids.
`Child JVM` in the output was renamed to `Other JVM`, since the processes that
matter most are not children.
Tested, because "silent" is the theme: the extraPids case asserts against a real
process that is an ANCESTOR of this JVM — never a descendant, which is the
property under test — and it was confirmed to fail before the fix rather than
assumed to cover it.
Also regenerates the CLI docs, stale for `max-cached-workspaces` since an earlier
merge, and records that the Windows test step has roughly halved (13 consecutive
re-runs measured 5m11s-7m8s against a comment claiming 12m52s-13m14s) so nobody
tightens those bounds against stale numbers.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
oyvindberg
force-pushed
the
fix/thread-dump-diagnostics
branch
from
August 9, 2026 21:03
c765557 to
633f1bc
Compare
oyvindberg
added a commit
that referenced
this pull request
Aug 24, 2026
`ChildProcessDiagnostics` backs two existing features — Ctrl-T (SIGINFO) in the
client and the dump the compile server writes at shutdown — and three separate
bugs meant both could produce a dump that looked fine and was missing the point.
All three are silent: an incomplete dump is indistinguishable from a dump of a
healthy process.
- `findJstack` only ever tried `bin/jstack`, never `jstack.exe`, so it found
nothing on WINDOWS at all — including in the server, which is the platform
and the process whose hangs are worth reading.
- it looked only under `java.home`. The client is a GraalVM native image with
no JDK of its own, so the property is absent or points somewhere without a
`bin/jstack`, and the client could never dump a child process anywhere. It
now takes JVM bin directories from the caller, which knows a real one.
- `dumpAll` walked only `ProcessHandle.current().descendants()`. A shared
compile server was spawned by whichever client started it, possibly days
ago, so it is nobody's descendant — meaning the dump reliably omitted the
one process actually doing the work. Callers can now name extra pids.
`Child JVM` in the output was renamed to `Other JVM`, since the processes that
matter most are not children.
Tested, because "silent" is the theme: the extraPids case asserts against a real
process that is an ANCESTOR of this JVM — never a descendant, which is the
property under test — and it was confirmed to fail before the fix rather than
assumed to cover it.
Also regenerates the CLI docs, stale for `max-cached-workspaces` since an earlier
merge, and records that the Windows test step has roughly halved (13 consecutive
re-runs measured 5m11s-7m8s against a comment claiming 12m52s-13m14s) so nobody
tightens those bounds against stale numbers.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #647, which is now the
--max-timefeature alone. This half stands on its own and fixes live bugs.ChildProcessDiagnosticsbacks two features that already exist — Ctrl-T (SIGINFO) in the client, and the dump the compile server writes at shutdown. Three separate bugs meant both could produce a dump that looked fine and was missing the point. All three are silent: an incomplete dump is indistinguishable from a dump of a healthy process.findJstackonly triedbin/jstack, neverjstack.exejava.homedumpAllwalked onlydescendants()Callers now pass JVM
bindirectories (they know a real JVM) and extra pids.Child JVMin the output becameOther JVM, since the processes that matter most are not children.Tested, because "silent" is the theme
The
extraPidscase asserts against a process that is an ancestor of the test JVM — never a descendant, which is exactly the property under test — and I confirmed it fails before the fix rather than assuming it covers anything. (It also asserts the dump contains real frames, not just a header, and that self is never dumped twice.)Also
max-cached-workspacessince an earlier merge🤖 Generated with Claude Code