JDK-8210265 : Crash in HSpaceCounters::update_used()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-08-31
  • Updated: 2023-11-10
  • Resolved: 2018-09-04
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 11 JDK 12
11.0.22-oracleFixed 12 b10Fixed
Related Reports
Relates :  
Description
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f0388f60988, pid=26361, tid=26362
#
# JRE version:  (12.0) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (12-internal+0-2018-08-30-1930205.jesper.wilhelmsson.jdk-flags, mixed mode, aot, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x84c988]  HSpaceCounters::update_used(unsigned long)+0x8
#

Seen in performance testing when running Perfstartup-Netty-Tuned-G1 and Perfstartup-JFAAS_Hello-Tuned-G1.
Comments
Fix request [11u] I backport this for parity with 11.0.22-oracle. No risk, only add a test change. Test passes. SAP nightly testing passed.
10-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2263 Date: 2023-11-07 05:54:18 +0000
07-11-2023

Git URL: https://github.com/openjdk/jdk/commit/a7d4df53fa70015e8efb689bf155ed870bc8e651
27-10-2023

URL: http://hg.openjdk.java.net/jdk/jdk/rev/7ed777a14094 User: tschatzl Date: 2018-09-04 10:19:24 +0000
04-09-2018

As part of this fix, please add -XX:-UsePerfData to some well chosen test that is ran no later than tier 3.
03-09-2018

I found no tests in the jdk that disable UsePerfData.
31-08-2018

This is really easy to reproduce: java -XX:-UsePerfData -version
31-08-2018

Relevant part of stack trace from an hs_err file: V [libjvm.so+0x84c988] HSpaceCounters::update_used(unsigned long)+0x8 V [libjvm.so+0x7e38a5] G1MonitoringSupport::G1MonitoringSupport(G1CollectedHeap*)+0x415 V [libjvm.so+0x7a781e] G1CollectedHeap::initialize()+0x8be V [libjvm.so+0xe42f81] Universe::initialize_heap()+0x41 V [libjvm.so+0xe43242] universe_init()+0x42 Also from the hs_err file, -XX:-UsePerfData. The G1MonitoringSupport constructor makes the _from_space_counters and then calls update_used(0) on that counters object. But because UsePerfData is false, the underlying counter variable object is not created, so _used is NULL and the attempt to set the value of _used crashes. This may have been introduced by 8209062: Clean up G1MonitoringSupport. That change is in the list that's new in the build that was being tested and failed.
31-08-2018