RFR: 8359827: Test runtime/Thread/ThreadCountLimit.java should run exclusively [v2]
SendaoYan
syan at openjdk.org
Mon Jul 21 09:02:43 UTC 2025
On Mon, 21 Jul 2025 02:29:37 GMT, David Holmes <dholmes at openjdk.org> wrote:
> FWIW we see no issue running this test, but we ensure we already have a high ulimit setting available in our test machines by default.
1. Maybe this test has been excluded by [TEST.groups](https://github.com/openjdk/jdk/blob/master/test/hotspot/jtreg/TEST.groups#L398)
2. The error reported in this testcase should not be related to the ulimit configuration of the test environment, but may be related to the number of CPU cores of the machine. On a machine with a large number of CPU cores, each testcase will start more gc threads and JIT threads, and the number of jtreg concurrency will also be relatively large, causing the total number of threads of all testcases to easily exceed 4096. For example, in the example below, my environment configuration ulimit -u is unlimited. I first start a background java process, which will start 5000 threads and will not exit; then I use shell predix `ulimit -u` to start the java process (similar to the test situation of this testcase), and then I cannot start java.
<img width="1594" height="164" alt="image" src="https://github.com/user-attachments/assets/095bee02-c61c-4d93-bcc8-8806dd561c96" />
[ManyThreads.java.txt](https://github.com/user-attachments/files/21343260/ManyThreads.java.txt)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26401#issuecomment-3095798953
More information about the hotspot-runtime-dev
mailing list