JDK-8170395 : Metaspace initialization queries the wrong chunk freelist
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-28
  • Updated: 2018-05-14
  • Resolved: 2016-11-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 8 JDK 9
8u172Fixed 9 b150Fixed
Related Reports
Cloners :  
Description
The fix for JDK-8169931 introduced a new assert to ensure that we always try to allocate chunks that are any of the three fixed sizes (specialized, small, medium) or a humongous chunk (if it is larger then the medium chunk size).

During metaspace initialization an initial metaspace chunk is allocated. The size of some of the metaspace instances can be specified on the command line. For example:
java -XX:InitialBootClassLoaderMetaspaceSize=30720 -version 

If this size is smaller than the medium chunk size and at the same time doesn't match the specialized or small chunk size, then we end up hitting the assert mentioned above:
# 
# Internal Error (/scratch/opt/jprt/T/P1/142848.erik/s/hotspot/src/share/vm/memory/metaspace.cpp:2359), pid=31643, tid=31646 
# assert(size > free_chunks(MediumIndex)->size()) failed: Not a humongous chunk 
# 
Comments
Bugs found by nightly testing. Verified by passed nightly.
26-07-2017