JDK-8227041 : runtime/memory/RunUnitTestsConcurrently.java has a memory leak
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8u371,11,12,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-07-01
  • Updated: 2023-08-07
  • Resolved: 2019-07-02
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 11 JDK 13 JDK 14 JDK 8
11.0.5Fixed 13Fixed 14 b04Fixed 8u401Fixed
Related Reports
Duplicate :  
Relates :  
Description
runtime/memory/RunUnitTestsConcurrently.java attempts to stress-test the metaspace allocator by allocating a metachunk of ~512K:

metaspace.cpp:

static void test_virtual_space_list_large_chunk() {
   ....
    vs_list->get_new_chunk(large_size, 0);
}

That chunk then is leaked.

Within RunUnitTestsConcurrently.java, this function is called in a tight loop by 30 threads concurrently for 15 seconds. Depending on how fast the machine is, this will usually eat up 10-20GB, often causing the process being OOM killed.

This is probably also the cause for JDK-8225200.



Comments
Fix request (11u): Test fix. Patch did not apply cleanly and had to be modified. Started a review discussion: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-July/001461.html This should be low risk, though and improves test stability.
23-07-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/8a153a932d0f User: stuefe Date: 2019-07-02 08:30:11 +0000
02-07-2019