JDK-8229169 : False failure of GenericTaskQueue::pop_local on architectures with weak memory model
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8,11,13,14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-08-06
  • Updated: 2020-06-01
  • Resolved: 2019-08-07
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 13 JDK 14 Other
11.0.6Fixed 13.0.4Fixed 14 b10Fixed openjdk8u232Fixed
Description
Various GC crashes were observed on our Loongson CPUs which support a weak memory model.
The crashes include (but not limit to) the following:
---------------------------------------------------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000ffeb261d04, pid=19632, tid=19649
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0x569d04]  G1ParScanThreadState::trim_queue()+0x35c
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x000000ffefb95350, pid=19674, tid=19676
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0x569350]  G1ParScanThreadState::copy_to_survivor_space(G1HeapRegionAttr, oopDesc*, markOopDesc*)+0xb0
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x000000fff2fb2034, pid=19694, tid=19698
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0x352034]  ClassLoaderData::oops_do(OopClosure*, int, bool)+0x7c
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000ffeadc095c, pid=19898, tid=19902
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0x3a095c]  oopDesc::size()+0x74
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000fff5e8d24c, pid=20088, tid=20090
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0x56924c]  G1ParScanThreadState::handle_evacuation_failure_par(oopDesc*, markOopDesc*)+0x15c
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000fff0f14a78, pid=19730, tid=19731
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# j  com.sun.tools.javac.comp.Attr.attribTree(Lcom/sun/tools/javac/tree/JCTree;Lcom/sun/tools/javac/comp/Env;Lcom/sun/tools/javac/comp/Attr$ResultInfo;)Lcom/sun/tools/javac/code/Type;+48 jdk.compiler@14-internal
#

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000fff0db43e8, pid=19880, tid=19882
#
# JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-adhoc.fool.jdk-mips)
# Java VM: OpenJDK 64-Bit Server VM (14-internal+0-adhoc.fool.jdk-mips, mixed mode, sharing, compressed oops, g1 gc, linux-mips64el)
# Problematic frame:
# V  [libjvm.so+0xe243e8]
#
---------------------------------------------------------

These crashes can be reproduced with the following test on Loongson CPUs.
---------------------------------------------------------
make test TEST="hotspot/jtreg/gc/g1/humongousObjects/TestHumongousClassLoader.java" CONF=release
---------------------------------------------------------
Comments
Fix request (13u): Same rationale as for 11u and 8u, the original patch applies cleanly.
26-05-2020

Thanks Zhengyu Gu for the backport.
08-10-2019

8u Fix Request: I would like to backport this patch to 8u. This bug can result fatal crash on weak memory systems and it is hard to debug. The original patch actually applied cleanly with file name (taskqueue.inline.hpp -> taskqueue.hpp) and path changes.
08-10-2019

11u Fix Request: I would like to backport this patch to 11u. This bug can result fatal crash on weak memory systems and it is hard to debug. The patch applies cleanly.
03-10-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/167cb7b4cd81 User: kbarrett Date: 2019-08-07 19:56:25 +0000
07-08-2019

RFR: https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2019-August/026684.html
06-08-2019