Repository navigation
Collect diagnostics when OSGi smoke test application hangs - #12938
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
Fail the OSGi smoke test after 2 minutes instead of waiting forever, and collect two thread dumps of the application (plus a system dump on IBM JVMs) into the build reports so they are included in the GitLab job artifacts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use a single constant for the exit timeout, resolve jcmd only for HotSpot, and create the dumps folder only when diagnostics are collected so passing IBM runs no longer leave an empty folder in reports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
More details
PID retrieval was verified on HotSpot 8 and 21, supporting diagnostic collection across Java versions. OpenJ9 dump completion and the full OSGi smoke-test flow remain unverified.
🤖 Bits Code Review · Commit 7b2b647
🟢 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. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Adds diagnostics to the OSGi smoke tests (
EquinoxSmokeTest,FelixSmokeTest,KnopflerfishSmokeTest) for the case where the test application never exits:testedProcess.waitFor()with a 2-minute wait. Normally the application exits within seconds.collectDiagnostics()writes intobuild/reports/<Class>.<timestamp>-dumps/and then fails the test:jcmd <pid> Thread.print -l.kill -3), then a system dump (kill -USR2). The test waits for the JVM to logProcessed dump event "user2"before cleanup kills the process. To support this, the application now starts with-Xdump:directory=<dumps dir>and-Xdump:system:events=user2,request=exclusive+prepwalk.collection.log: the PID and the outcome of each command.testProcess.<Class>.<timestamp>.0.log, so dumps from a retried test don't overwrite earlier ones. To allow this,ProcessManager.logFileTimestampchanges fromprivatetoprotected.No CI configuration changes are needed.
.gitlab/collect_reports.shalready copiesworkspace/**/build/reports/*intoreports.tar, which is uploaded as a job artifact (when: always). Because the test now fails instead of hanging until the job times out,after_scriptand artifact collection run normally.Motivation
Recently the OSGi smoke tests have been hanging on GitLab more often than usual, and those runs leave no diagnostics. The job just times out, and there is nothing that shows where the application is stuck. This change collects thread dumps (and a system dump on IBM JVMs) so the next hang can be investigated.
Additional Notes
JVMDUMP012Ewhen the JVM runs under Gradle. Whether it works on CI depends on the container'score_patternand core size limit. The javacores record both, so the first hang on CI will show whether it works there.🤖 Generated with Claude Code