JDK-8320836 : jtreg gtest runs should limit heap size
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17,21,22,25,26
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-11-28
  • Updated: 2025-09-23
  • Resolved: 2025-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 21 JDK 25 JDK 26
17.0.18-oracleFixed 21.0.10-oracleFixed 25.0.2Fixed 26 b09Fixed
Related Reports
Relates :  
Description
JDK-8320366 highlighted a problem with gtests in that we should limit the heap size for gtest runs (and possibly, number of processors too).

Otherwise, gtests may accumulate a large malloc footprint for GC supporting structures when run on big boxes.
Comments
Fix request [17u] I backport this for parity with 17.0.18-oracle. No risk, only a test change. Clean backport. SAP nightly testing passed.
21-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/3965 Date: 2025-09-19 10:22:45 +0000
19-09-2025

[jdk25u-fix-request] Approval Request from Rui Li A clean backport for https://bugs.openjdk.org/browse/JDK-8320836. This patch limits the gtest max heap size. In the original JBS JDK-8320836, there was already a customer report saying CI pipeline gtest failed due to large heap. Backporting this patch can benefit non tip customers. Running tests. In tip for ~2 months.
09-09-2025

[jdk21u-fix-request] Approval Request from Rui Li A clean backport for https://bugs.openjdk.org/browse/JDK-8320836. This patch limits the gtest max heap size. In the original JBS JDK-8320836, there was already a customer report saying CI pipeline gtest failed due to large heap. Backporting this patch can benefit non tip customers. Running tests. In tip for ~2 months.
09-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/2161 Date: 2025-09-09 01:54:34 +0000
09-09-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk25u/pull/175 Date: 2025-09-09 01:54:24 +0000
09-09-2025

Changeset: ac9e5102 Branch: master Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2025-07-25 06:40:37 +0000 URL: https://git.openjdk.org/jdk/commit/ac9e51023fc34a82b795950a109af2397826adaa
25-07-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26454 Date: 2025-07-24 08:17:12 +0000
24-07-2025

For the record.. saw this happening today a few times in our CI pipeline.
23-07-2025

Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
14-01-2025

Limiting to 128m will fail: 3634 [ FAILED ] CollectorPolicy.young_scaled_initial_ergo_vm 3635 [ FAILED ] CollectorPolicy.young_cmd_other_vm 256m seems to work.
28-11-2023