JDK-8255268 : 32-bit failures in runtime/Metaspace/elastic
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-10-22
  • Updated: 2021-01-28
  • Resolved: 2020-10-23
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 16
16 b22Fixed
Related Reports
Relates :  
Description
Try this:

$ CONF=linux-x86-server-fastdebug make images run-test TEST=runtime/Metaspace/elastic/

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/shade/trunks/jdk/src/hotspot/share/memory/metaspace/testHelpers.cpp:69), pid=2383937, tid=2383977
#  assert(is_aligned(reserve_limit, Metaspace::reserve_alignment_words())) failed: reserve_limit (524288) not aligned to metaspace reserve alignment (1048576)
#

Comments
Changeset: 2ca7a080 Author: Thomas Stuefe <stuefe@openjdk.org> Date: 2020-10-23 05:27:57 +0000 URL: https://git.openjdk.java.net/jdk/commit/2ca7a080
23-10-2020

Metaspace reserve alignment is largest chunk size, which is 4M regardless of bitness, so 512K words on 64bit and 1M words on 32bit. -> for 32bit, test needs to specify a reserve size aligned to 1M, not 512K.
22-10-2020

[~stuefe], I think TestMetaspaceAllocationMT* should account for 32-bit VMs? The jtreg configs can be selected with "@requires vm.bits == 32".
22-10-2020