[jdk25u-dev] RFR: 8354894: java/lang/Thread/virtual/Starvation.java timeout on server with high CPUs

Aleksey Shipilev shade at openjdk.org
Wed Dec 3 16:43:09 UTC 2025


On Tue, 2 Dec 2025 21:26:37 GMT, Roland Mesde <duke at openjdk.org> wrote:

> Backporting JDK-8354894: java/lang/Thread/virtual/Starvation.java timeout on server with high CPUs
> 
> For parity with Oracle JDK. Fix adjusts iteration count by dividing by CPU core count, and removed timeout=800 as default 120 timeout is now sufficient. 
> 
> Merge conflict (resolved) was the change in the timeout.
> 
> Ran GHA Sanity Checks (passed), jtreg tier1 tests (passed) and related tests (passed) on linux-x64, linux-aarch64, macos-aarch64 and windows-x64. Also ran a test on an EC2 instance (linux-x64) with high cpu count (r5dn.24xlarge - 96 core) and it finished under 1s:
> 
> (Passed) - make test-tier1
> (Passed) - make test TEST=test/jdk/java/lang/Thread/virtual/Starvation.java
> 
> Results are attached.
> 
> [linux-x64-96-core-test.log](https://github.com/user-attachments/files/23911957/linux-x64-96-core-test.log)
> 
> [linux-aarch64-jtreg-tier1.log](https://github.com/user-attachments/files/23911996/linux-aarch64-jtreg-tier1.log)
> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/23911997/linux-aarch64-specific-test.log)
> [linux-x64-jtreg-tier1.log](https://github.com/user-attachments/files/23911998/linux-x64-jtreg-tier1.log)
> [linux-x64-specific-test.log](https://github.com/user-attachments/files/23911999/linux-x64-specific-test.log)
> [macos-aarch64-jtreg-tier1.log](https://github.com/user-attachments/files/23912000/macos-aarch64-jtreg-tier1.log)
> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/23912001/macos-aarch64-specific-test.log)
> [windows-x64-jtreg-tier1.log](https://github.com/user-attachments/files/23912002/windows-x64-jtreg-tier1.log)
> [windows-x64-specific-test.log](https://github.com/user-attachments/files/23912003/windows-x64-specific-test.log)

AFAICS, the `timeout=800` -> `timeout=200` change was part of  [JDK-8260555: Change the default TIMEOUT_FACTOR from 4 to 1](https://bugs.openjdk.org/browse/JDK-8260555), which was reverted by [JDK-8369491](https://bugs.openjdk.org/browse/JDK-8369491), but mainline just never needed to update the test back, because this fix landed.

-------------

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk25u-dev/pull/49#pullrequestreview-3535921996


More information about the jdk-updates-dev mailing list