Skip to content

Issue #14904 - Stabilize virtual thread tracking dump test - #15647

Open
DragonFSKY wants to merge 1 commit into
jetty:jetty-12.1.xfrom
DragonFSKY:fix-14904-tracking-dump
Open

Issue #14904 - Stabilize virtual thread tracking dump test#15647
DragonFSKY wants to merge 1 commit into
jetty:jetty-12.1.xfrom
DragonFSKY:fix-14904-tracking-dump

Conversation

@DragonFSKY

@DragonFSKY DragonFSKY commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #14904.

testTrackingDump() signaled task startup before the blocking virtual threads necessarily reached WAITING, and its 10-second timeout allowed tracked tasks to finish before both dumps completed.

Use one task instance per virtual thread, wait for the two blocking tasks to reach WAITING, and keep all four tasks alive until both dumps are complete. This preserves the existing assertions for thread state, carrier information, and detailed stack frames.

Tests:

  • JDK 21 and 25: VirtualThreadPoolTest#testTrackingDump
  • JDK 21 and 25: jetty-util test suite (2963 tests, 0 failures, 0 errors)

AI disclosure

I used OpenAI GPT-5.6 and Kimi K3 to assist with issue analysis and drafting the implementation and tests. I reviewed and verified the final changes.

Signed-off-by: Dongliang Xie <dragonfsky@gmail.com>
@DragonFSKY
DragonFSKY force-pushed the fix-14904-tracking-dump branch from f2b749c to 4e4576d Compare August 25, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: VirtualThreadPoolTest.testTrackingDump() — fails in 30% of CI builds

1 participant