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 thread necessarily reached WAITING, and its 10-second timeout allowed tracked tasks to finish before both dumps completed.

Use one blocking task and one spinning task. Wait for the blocking task to reach WAITING before starting the spinner, and keep both alive until both dumps are complete. This preserves the assertions for waiting and runnable states, carrier information, and detailed stack frames without assuming multiple scheduler carriers.

Tests:

  • JDK 21 and 25: VirtualThreadPoolTest#testTrackingDump
  • JDK 21 and 25: VirtualThreadPoolTest#testTrackingDump with -Djdk.virtualThreadScheduler.parallelism=1
  • JDK 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 e2ff8d7 to b5c2784 Compare September 3, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

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

2 participants