Improve diagnostics for hung-test dump collection - #12607
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
LGTM
On a related note, I discovered this week-end that JUnit 5 has a similar mechanism for thread dumps, e.g. (junit-platform.properties)
# Native SWT calls may ignore interruption; dump all threads before CI kills the JVM.
junit.jupiter.execution.timeout.threaddump.enabled=true
# Class-level @Timeout does not cover Display/Shell setup and disposal.
junit.jupiter.execution.timeout.lifecycle.method.default=30 s
junit.jupiter.execution.timeout.thread.mode.default=same_thread
Which of course won't help us since most of our tests are in Groovy / Spock.
|
/merge -f --reason "This is build fix, tested on PR, no need to run MQ" |
|
View all feedbacks in Devflow UI.
The expected merge time in
Warning This change was merged without running any pre merge CI checks Reason: This is build fix, tested on PR, no need to run MQ |
75c6d58
into
master
What Does This Do
Add concise start/completion messages for dump commands, including the task, command, output destination, and elapsed time. Report command and directory failures with stack traces, warn when no test executor is found, and continue with subsequent dump commands after a command failure.
On interruption, stop the diagnostic subprocess and preserve the interrupt status. Close process-discovery streams after use.
Motivation
The existing collection-start message does not identify which command is still running. Errors lose their stack traces, and a failed heap-dump command aborts collection before thread dumps can be attempted. These gaps make missing dumps difficult to diagnose.
Additional Notes
Validation: all 4 tests passed in
DumpHangedTestIntegrationTest, covering normal collection, no collection for a short test, directory-creation failure, and a simulated heap-dump failure followed by successful thread-dump attempts.The simulated failure reports
java.io.IOException: Process failed with exit code 7with aDumpHangedTestPlugin.runCmdstack frame; the test then verifies both per-process and all-JVM thread-dump output. This demonstrates that one failed command no longer discards the remaining diagnostic attempts.Dump scheduling, heap-first ordering, and command wait times remain unchanged. Collection still depends on the per-task timer; this change does not capture dumps before a separate job-level deadline.
Related plugin configuration refactor: #11846.
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue