JDK-8320253 : G1: SIGSEGV in G1ParScanThreadState::trim_queue_to_threshold
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P2
  • Status: Closed
  • Resolution: Other
  • OS: os_x
  • CPU: x86_64
  • Submitted: 2023-11-16
  • Updated: 2023-12-30
  • Resolved: 2023-12-13
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 22
22Resolved
Related Reports
Relates :  
Relates :  
Description
The following test failed in the JDK22 CI:

jdk/jshell/T8146368/JShellToolTest8146368.java

Here's a snippet from the log file:

#section:testng
----------messages:(7/412)----------
command: testng -Duser.language=ja JShellToolTest8146368
reason: User specified action: run testng/othervm -Duser.language=ja JShellToolTest8146368 
started: Thu Nov 16 14:23:31 GMT 2023
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules jdk.jshell --add-exports jdk.jshell/jdk.internal.jshell.tool=ALL-UNNAMED
finished: Thu Nov 16 14:23:33 GMT 2023
elapsed time (seconds): 1.853
----------configuration:(4/127)----------
Boot Layer
  add modules: jdk.jshell                          
  add exports: jdk.jshell/jdk.internal.jshell.tool ALL-UNNAMED

----------System.out:(19/1071)----------
config ReplToolTesting.setUp(): success
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00000001164c67f0, pid=97094, tid=28675
#
# JRE version: Java(TM) SE Runtime Environment (22.0+25) (build 22-ea+25-1931)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (22-ea+25-1931, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# V  [libjvm.dylib+0x4c67f0]  G1ParScanThreadState::trim_queue_to_threshold(unsigned int)+0x460
#
# Core dump will be written. Default location: core.97094
#
# An error report file with more information is saved as:
# /System/Volumes/Data/mesos/work_dir/slaves/0db9c48f-6638-40d0-9a4b-bd9cc7533eb8-S13851/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1b96e9cb-7ed3-44b9-b553-8a9e56dcfb36/runs/91398d12-5635-463e-9fd6-caf2a48692d0/testoutput/test-support/jtreg_open_test_langtools_tier1/scratch/1/hs_err_pid97094.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
----------System.err:(0/0)----------
----------rerun:(37/8767)*----------

Here's the crashing thread's stack:

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

Current thread (0x00007fec4785f770):  WorkerThread "GC Thread#7"    [id=28675, stack(0x0000700006e05000,0x0000700006f05000) (1024K)]

Stack: [0x0000700006e05000,0x0000700006f05000],  sp=0x0000700006f04b70,  free space=1022k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.dylib+0x4c67f0]  G1ParScanThreadState::trim_queue_to_threshold(unsigned int)+0x460
V  [libjvm.dylib+0x4d4542]  G1ScanHRForRegionClosure::scan_memregion(unsigned int, MemRegion)+0xd2
V  [libjvm.dylib+0x4d43a3]  void G1ScanHRForRegionClosure::ChunkScanner::on_dirty_cards<G1ScanHRForRegionClosure::scan_heap_roots(HeapRegion*)::'lambda'(unsigned char*, unsigned char*)>(G1ScanHRForRegionClosure::scan_heap_roots(HeapRegion*)::'lambda'(unsigned char*, unsigned char*)&&)+0x3d3
V  [libjvm.dylib+0x4d3f44]  G1ScanHRForRegionClosure::scan_heap_roots(HeapRegion*)+0x124
V  [libjvm.dylib+0x4d3e00]  G1ScanHRForRegionClosure::do_heap_region(HeapRegion*)+0x50
V  [libjvm.dylib+0x4d2c86]  G1RemSet::scan_heap_roots(G1ParScanThreadState*, unsigned int, G1GCPhaseTimes::GCParPhases, G1GCPhaseTimes::GCParPhases, bool)+0x126
V  [libjvm.dylib+0x4ed768]  G1EvacuateRegionsTask::scan_roots(G1ParScanThreadState*, unsigned int)+0x48
V  [libjvm.dylib+0x4ed615]  G1EvacuateRegionsBaseTask::work(unsigned int)+0x75
V  [libjvm.dylib+0xb71acc]  WorkerThread::run()+0x7c
V  [libjvm.dylib+0xaaee28]  Thread::call_run()+0xa8
V  [libjvm.dylib+0x90aeaa]  thread_native_entry(Thread*)+0x10a
C  [libsystem_pthread.dylib+0x68fc]  _pthread_start+0xe0
C  [libsystem_pthread.dylib+0x2443]  thread_start+0xf

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000000077fe5e5f8

I'm starting this bug off as a P2 since this is a Tier1 crash.
Comments
Suspected hardware issue.
13-12-2023

Did not reproduce in the next two Tier1 job sets so I've lowered the priority from P2 -> P3 and labeled it as intermittent. Triage team can do the real ILW analysis.
16-11-2023