Allow customizing slow JVM shutdown thread dump for Java test runner #24854
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-Java
Issues for Java rules
type: feature request
Description of the feature request:
Currently, BazelTestRunner dumps all threads if JVM exit takes longer than 5 seconds (printStackTracesIfJvmExitHangs in BazelTestRunner.java). This duration is hard-coded and this cannot be changed.
In theory, this sounds reasonable, though we do have some long-running E2Es, which also execute real shutdown hooks and it can take longer than 5 seconds, resulting in thread dumps in a happy-path.
If there's an issue with a shutdown and it actually hangs, these logs are not really useful as well, because they are emitted after 5s since shutdown, but by the time test timeout happens - some (or even most) of the threads might have already been shutdown, and the emitted thread dump is actually misleading.
Can this duration be configurable?
Which category does this issue belong to?
Java Rules
What underlying problem are you trying to solve with this feature?
Redundant and misleading thread dumps for long-running E2E tests.
Which operating system are you running Bazel on?
No response
What is the output of
bazel info release
?No response
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: