JDK-8312525 : New test runtime/os/TestTrimNative.java#trimNative is failing: did not see the expected RSS reduction
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_oracle_7
  • CPU: x86_64
  • Submitted: 2023-07-21
  • Updated: 2023-08-25
  • Resolved: 2023-07-29
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 22
17.0.9Fixed 21.0.1Fixed 22 b09Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8312530 :  
Description
----------System.err:(36/1936)----------
 stdout: [[0.189s][info][trimnative] Periodic native trim enabled (interval: 500 ms)
[0.189s][info][trimnative] Native heap trimmer start
Will spike now...
[0.690s][info][trimnative] Periodic Trim (1): 365M->357M (-7928K) 0.596ms
Done spiking.
GC...
Sleeping...
[1.191s][info][trimnative] Periodic Trim (2): 216M->206M (-10616K) 0.605ms
[1.691s][info][trimnative] Periodic Trim (3): 206M->206M (+0B) 0.113ms
[2.191s][info][trimnative] Periodic Trim (4): 206M->206M (+0B) 0.112ms
[2.691s][info][trimnative] Periodic Trim (5): 206M->206M (+0B) 0.110ms
[3.191s][info][trimnative] Periodic Trim (6): 206M->206M (+0B) 0.110ms
[3.692s][info][trimnative] Periodic Trim (7): 206M->206M (+0B) 0.110ms
[4.192s][info][trimnative] Periodic Trim (8): 206M->206M (+0B) 0.144ms
[4.692s][info][trimnative] Periodic Trim (9): 206M->206M (+0B) 0.134ms
[5.192s][info][trimnative] Periodic Trim (10): 206M->206M (+0B) 0.111ms
[5.198s][debug][trimnative] Trim suspended for chunk pool cleaner (1 suspend requests)
[5.198s][debug][trimnative] Trim resumed after chunk pool cleaner
[5.693s][info ][trimnative] Periodic Trim (11): 206M->204M (-1228K) 0.245ms
Done.
[5.906s][info ][trimnative] Native heap trimmer stop
];
 stderr: []
 exitValue = 0

java.lang.RuntimeException: We did not see the expected RSS reduction in the UL log. Expected (with fudge) to see at least a combined reduction of 67108864.
	at TestTrimNative.parseOutputAndLookForNegativeTrim(TestTrimNative.java:204)
	at TestTrimNative.main(TestTrimNative.java:256)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
	at java.base/java.lang.Thread.run(Thread.java:1570)

Appears to only fail on our Oracle Linux 7.9 machines
Comments
Fix Request (17u) Same reason as for 21u. ProblemList hunks are missing from 17u PR. Otherwise clean.
16-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1662 Date: 2023-08-14 09:33:58 +0000
14-08-2023

Fix Request (21u) Testfix followup for JDK-8312525. Applies semi-cleanly (missing ProblemList hunks). Test passes.
09-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1633 Date: 2023-07-31 09:30:40 +0000
31-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u/pull/26 Date: 2023-07-31 09:21:27 +0000
31-07-2023

Changeset: ad34be1f Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2023-07-29 05:36:58 +0000 URL: https://git.openjdk.org/jdk/commit/ad34be1f329edc8e7155983835cc70d733c014b8
29-07-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14984 Date: 2023-07-22 06:57:43 +0000
26-07-2023

> Interesting. I would like to see the malloc tunables settings on that box. [~stuefe] what needs to be run to show you this information?
23-07-2023

Interesting. I would like to see the malloc tunables settings on that box. This is not an error, since the glibc apparently already reclaims a lot of memory automatically on free. My assumption is that the system is running possibly with MALLOC_ARENA_MAX=1 and MALLOC_TRIM_THRESHOLD_ to a very low value.
22-07-2023