RFR: 8359827: Test runtime/Thread/ThreadCountLimit.java should run exclusively [v2]
SendaoYan
syan at openjdk.org
Mon Jul 21 09:22:39 UTC 2025
On Mon, 21 Jul 2025 09:00:03 GMT, SendaoYan <syan 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.
>
>> 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="1593" height="188" alt="image" src="https://github.com/user-attachments/assets/6b83d04a-a8dd-481b-96dd-f6372ff10591" />
>
>
> [ManyThreads.java.txt](https://github.com/user-attachments/files/21343335/ManyThreads.java.txt)
> @sendaoYan `exclusiveAccess.dirs` does not work the way you expect/require. It simply indicates that only one test at a time may run from the given directory. It does not mean no other tests from any other directories may run.
Thanks your correction @dholmes-ora.
I have move this test to test/hotspot/jtreg/resourcehogs, similar to [JDK-8227645](https://bugs.openjdk.org/browse/JDK-8227645).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26401#issuecomment-3095863364
More information about the hotspot-runtime-dev
mailing list