Integrated: 8359827: Test runtime/Thread/ThreadCountLimit.java need loop increasing the limit

SendaoYan syan at openjdk.org
Thu Jul 24 01:51:01 UTC 2025


On Sat, 19 Jul 2025 02:08:59 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> The test runtime/Thread/ThreadCountLimit.java was observed fails when run with other tests. The test start subprocess with [shell prefix command](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java#L82) `ulimit -u 4096` which intend to limite the usage of thread number. But this will cause test fails when this test run with other tests. I create a demo to demonstrate that.
> 
> I start a java process which will create 5k threads, and then I can not start new java process with prefix `ulimit -u 4096` on the same machine.
> 
> <img width="1573" height="182" alt="image" src="https://github.com/user-attachments/assets/8dd53ade-cad7-4a2f-b5d9-d4b2d200b728" />
> 
> 
> [ManyThreads.java.txt](https://github.com/user-attachments/files/21324354/ManyThreads.java.txt)
> 
> So it's necessary to make this test run sperately to make this test success.
> Change has been verified locally, test-fix only, risk is low.

This pull request has now been integrated.

Changeset: fc803844
Author:    SendaoYan <syan at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/fc8038441daebc717fedaeb107e37bf216d542d3
Stats:     20 lines in 1 file changed: 13 ins; 0 del; 7 mod

8359827: Test runtime/Thread/ThreadCountLimit.java need loop increasing the limit

Co-authored-by: David Holmes <dholmes at openjdk.org>
Reviewed-by: dholmes

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

PR: https://git.openjdk.org/jdk/pull/26401


More information about the hotspot-runtime-dev mailing list