JDK-8024396 : VM crashing with assert(!UseLargePages || UseParallelOldGC || use_large_pages) failed: Wrong alignment to use large pages
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-09-06
  • Updated: 2014-07-07
  • Resolved: 2013-09-16
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 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
On solaris-sparc VM crashed with

assert(!UseLargePages || UseParallelOldGC || use_large_pages) failed: Wrong alignment to use large pages

when invoked with following options:
java -Xms10m -Xmx20m -XX:-UseParallelOldGC -version

UseLargePages is true in this case, so it is the same as to start java with -XX:+UseLargePages.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/tmp/workspace/8-2-build-solaris-sparc/jdk8/131/hotspot/src/share/vm/memory/universe.cpp:882), pid=28776, tid=2
#  assert(!UseLargePages || UseParallelOldGC || use_large_pages) failed: Wrong alignment to use large pages
#
# JRE version:  (8.0-b106) (build )
# Java VM: Java HotSpot(TM) Server VM (25.0-b48-fastdebug mixed mode solaris-sparc )
# Core dump written. Default location: /tmp/core or core.28776
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

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

Current thread (0x0002d000):  JavaThread "Unknown thread" [_thread_in_vm, id=2, stack(0xfd370000,0xfd3f0000)]

Stack: [0xfd370000,0xfd3f0000],  sp=0xfd3ef4a8,  free space=509k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x10c7a44]  void VMError::report_and_die()+0x73c
V  [libjvm.so+0x6831ac]  void report_vm_error(const char*,int,const char*,const char*)+0x74
V  [libjvm.so+0x1053fd0]  ReservedSpace Universe::reserve_heap(unsigned,unsigned)+0x8c
V  [libjvm.so+0xe1f8d4]  int ParallelScavengeHeap::initialize()+0x1e4
V  [libjvm.so+0x1053ed4]  int Universe::initialize_heap()+0x1d8
V  [libjvm.so+0x1053b28]  int universe_init()+0x68
V  [libjvm.so+0x859fac]  int init_globals()+0x110
V  [libjvm.so+0x1020f0c]  int Threads::create_vm(JavaVMInitArgs*,bool*)+0x2a4
V  [libjvm.so+0xa02e48]  JNI_CreateJavaVM+0xdc
C  [libjli.so+0x7470]  InitializeJVM+0x100
C  [libjli.so+0x57e0]  JavaMain+0x68

Note, that par compact gc could be used even if flag -XX:-UseParallelOldGC was passed to VM.

This failure is regression introduced after JDK-8007074 integration.
Comments
There is no reason to make this issue confidential
11-09-2013

I added the assert to find cases where we say we want to use large pages (UseLargePages) but send in an alignment that isn't large pages aligned. The UseParallelOIdGC part is there because the ParallelScavengeHeap has it's own code to determine if the heap should be using large pages. The assert misses the fact that -XX:+UseParallelGC (parallel young GC) and -XX:-UseParallelOldGC (serial old GC) also uses the ParallelScavengeHeap. This assert: # assert(!UseLargePages || UseParallelOldGC || use_large_pages) failed: Wrong alignment to use large pages should be changed into: # assert(!UseLargePages || UseParallelGC || use_large_pages) failed: Wrong alignment to use large pages
06-09-2013