JDK-8040977 : G1 crashes when run with -XX:-G1DeferredRSUpdate
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-04-18
  • Updated: 2015-01-21
  • Resolved: 2014-06-26
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.
8u40Fixed 9 b24Fixed
When running a debug VM with G1DeferredRSUpdate disabled, G1 crashes the first time when the remembered set is being updated during evacuation.

The problem is that G1ParScanClosure is initialized with an uninitialized queue_num() value of G1ParScanThreadState in the G1ParScanThreadState constructor. This is because initialization of the values in the initializer list is perfomed according to the declaration order in the class, not the order given in the initializer list.

The fix is to move the declaration of the G1ParScanClosure after the declaration of the _queue_num member in the G1ParScanThreadState class.

Typical crash location is something like # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f72038de9c2, pid=19611, tid=140127631820544 # # JRE version: Java(TM) SE Runtime Environment (9.0-b01) (build 1.9.0-ea-b01) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b62-internal-debug mixed mode linux-amd64 compressed oops) # Problematic frame: # V [libjvm.so+0x7e19c2] FromCardCache::at(unsigned int, unsigned int)+0x28 # # 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: # /home/thomas/Downloads/vmshare/8027295/src/test/JTwork/scratch/hs_err_pid19611.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # Current thread is 140127631820544 Debugging the thread shows that G1ParScanThreadState::_scanner._worker_id is 32767, i.e. an out-of-bounds value

I=Debug VM + -XX:-G1DeferredRSUpdate -> L L=Reproducible -> H W=Don't use that option -> M LHM=P4