JDK-8016666 : G1:UseSHM crashes the JVM if G1HeapRegionSize > os::large_page_size()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs24,hs25
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: linux
  • Submitted: 2013-06-14
  • Updated: 2023-08-21
  • Resolved: 2013-06-25
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.
Other
hs24Resolved
Related Reports
Duplicate :  
Relates :  
Description
The call to os::reserve_memory_special in ReservedSpace::initialize is ignoring the 'alignment' parameter. Because of this we get an unaligned address back, which results in various crashes.

Repro:

Setup shm large pages according to os_linux.cpp, and run:

sudo java -XX:+UseG1GC -XX:G1HeapRegionSize=16M -Xmx64m -XX:-UseCompressedOops -XX:+UseLargePages 
-XX:+UseSHM -XX:+PrintGC SystemGC

ILW: High, Low, Medium => P3, until further evaluated.

Comments
Solved by the fix for JDK-8007074
25-06-2013

Fixed by the change for JDK-8007074
25-06-2013

Latest hsx24 does exhibit this problem.
19-06-2013

Running with some "Hello World" application that also induces a few gcs: Only hs25 crashes, in debug mode with a nice message notifying of the issue: # To suppress the following error report, specify this argument # after -XX: or in .hotspotrc: SuppressErrorAt=/virtualspace.cpp:141 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../src/src/share/vm/runtime/virtualspace.cpp:141), pid=11119, tid=139672393332480 # assert((uintptr_t) base % alignment == 0) failed: Large pages returned a non-aligned address # # JRE version: (8.0) (build ) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b34-internal-debug mixed mode linux-amd64 ) # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # .../hs_err_pid11119.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # On hs24 the VM gives a warning during initialization or just succeeds without any warning: OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory (errno = 22). java version "1.7.0_21" OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) I do not expect the open version different to others here. So no issue on hs24? (Will check with latest) Edit: included warning for hs24; more testing with hs24 showed that this does not seem to be an issue with that version.
18-06-2013

Triaged. hs24
17-06-2013