JDK-8277854 : The upper bound of GCCardSizeInBytes should be limited to 512 for 32-bit platforms
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-11-26
  • Updated: 2022-02-10
  • Resolved: 2021-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 18
18 b26Fixed
Related Reports
CSR :  
Relates :  
Description
runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java crashes on linux/x86_32 when`-XX:GCCardSizeInBytes=1024`.

```
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/home/jdk/src/hotspot/share/gc/g1/g1BlockOffsetTable.cpp:186), pid=46911, tid=46931
#  guarantee(_bot->offset_array(start_card) == BOTConstants::N_words) failed: Wrong value in second card
#
# JRE version: OpenJDK Runtime Environment (18.0) (fastdebug build 18-internal+0-adhoc..jdk)
# Java VM: OpenJDK Server VM (fastdebug 18-internal+0-adhoc..jdk, mixed mode, sharing, tiered, g1 gc, linux-x86)
# Problematic frame:
# V  [libjvm.so+0xa3c817]  G1BlockOffsetTablePart::check_all_cards(unsigned int, unsigned int) const [clone .part.22]+0x37
#


---------------  T H R E A D  ---------------

Current thread (0xa32008d8):  WorkerThread "GC Thread#1" [stack: 0xa1b80000,0xa1c00000] [id=93442]

Stack: [0xa1b80000,0xa1c00000],  sp=0xa1bfefc0,  free space=507k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x78cd01]  G1BlockOffsetTablePart::check_all_cards(unsigned int, unsigned int) const+0x3f
V  [libjvm.so+0x78ccb6]  G1BlockOffsetTablePart::set_remainder_to_point_to_start_incl(unsigned int, unsigned int)+0x1a2
V  [libjvm.so+0x78cb0c]  G1BlockOffsetTablePart::set_remainder_to_point_to_start(HeapWordImpl**, HeapWordImpl**)+0xf2
V  [libjvm.so+0x78d1da]  G1BlockOffsetTablePart::alloc_block_work(HeapWordImpl***, HeapWordImpl**, HeapWordImpl**)+0x280
V  [libjvm.so+0x78dce4]  G1BlockOffsetTablePart::alloc_block(HeapWordImpl**, HeapWordImpl**)+0x22
V  [libjvm.so+0x8874a9]  HeapRegion::alloc_block_in_bot(HeapWordImpl**, HeapWordImpl**)+0x1b
V  [libjvm.so+0x7d3ee1]  G1FullGCCompactionPoint::forward(oopDesc*, unsigned int)+0x14f
V  [libjvm.so+0x7d92d0]  G1FullGCPrepareTask::G1PrepareCompactLiveClosure::apply(oopDesc*)+0x2c
V  [libjvm.so+0x7d9d97]  void HeapRegion::apply_to_marked_objects<G1FullGCPrepareTask::G1PrepareCompactLiveClosure>(G1CMBitMap*, G1FullGCPrepareTask::G1PrepareCompactLiveClosure*)+0x79
V  [libjvm.so+0x7d93d8]  G1FullGCPrepareTask::G1CalculatePointersClosure::prepare_for_compaction_work(G1FullGCCompactionPoint*, HeapRegion*)+0x74
V  [libjvm.so+0x7d945f]  G1FullGCPrepareTask::G1CalculatePointersClosure::prepare_for_compaction(HeapRegion*)+0x7d
V  [libjvm.so+0x7d8de4]  G1FullGCPrepareTask::G1CalculatePointersClosure::do_heap_region(HeapRegion*)+0x66
V  [libjvm.so+0x88eacc]  HeapRegionManager::par_iterate(HeapRegionClosure*, HeapRegionClaimer*, unsigned int) const+0xe0
V  [libjvm.so+0x7a47b8]  G1CollectedHeap::heap_region_par_iterate_from_start(HeapRegionClosure*, HeapRegionClaimer*) const+0x1c
V  [libjvm.so+0x7d90d8]  G1FullGCPrepareTask::work(unsigned int)+0x72
V  [libjvm.so+0xf3e5e4]  WorkerTaskDispatcher::worker_run_task()+0x6c
V  [libjvm.so+0xf3e9e5]  WorkerThread::run()+0x29
V  [libjvm.so+0xe579b8]  Thread::call_run()+0x17c
V  [libjvm.so+0xc311e6]  thread_native_entry(Thread*)+0x198
C  [libpthread.so.0+0x63bd]  start_thread+0xfd
```
Comments
Changeset: 3a4a94e5 Author: Jie Fu <jiefu@openjdk.org> Date: 2021-11-29 23:17:39 +0000 URL: https://git.openjdk.java.net/jdk/commit/3a4a94e5a830c4e88ac12619b868f3d89aa416a5
29-11-2021