Collect thread dumps before heap dumps and start earlier - #12619
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. |
🟢 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.
|
/merge -f --reason "Fix for build, tested in 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: Fix for build, tested in PR, no need to run MQ |
3974868
into
master
What Does This Do
Start hung-test dump collection 180 seconds before the task timeout instead of 60 seconds. Collect thread dumps for all discovered workers and child processes, followed by the all-JVM thread dump, before starting any heap dumps.
Motivation
Heap-first collection could consume the remaining timeout window before reaching the thread-dump command. Gradle could then terminate the test worker while the collector was still working, leaving no usable thread dump. Collecting stacks first preserves the lightweight diagnostics before expensive heap collection, and starting earlier leaves more time for both.
Additional Notes
Follow-up to #12607, which added command timing and failure diagnostics. Those diagnostics exposed the collection-order problem; that PR did not introduce the heap-first ordering.
In an observed failure, the first worker's heap dump took about 17.5 seconds. The next worker's heap dump took 71.3 seconds, crossing the test task's 20-minute timeout. Its subsequent thread-dump request failed with:
The sequence explains the missing thread dump: the request was delayed behind heap collection until task timeout and worker teardown. The triggering task's directory can contain dumps from other active workers, so collecting every worker's stack before any heap dump matters.
Validation: 5 integration tests passed, including the default three-minute offset, thread-before-heap ordering, actual dump creation, directory failure reporting, and heap-command failure reporting.
Task timeouts remain enforced. This improves diagnostic collection; it does not address the underlying test slowdown or guarantee that all heap dumps finish before termination.
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