JDK-8321944 : [premain] C1: assert(initial_pc_desc->pc_offset() < 0) failed: must be sentinel w/ -XX:CacheDataStore on linux-aarch64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-leyden
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-12-13
  • Updated: 2024-04-20
  • Resolved: 2024-04-20
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
repo-leydenFixed
Related Reports
Relates :  
Description
runtime/cds/appcds/leyden/SpringPetClinic.java

#  Internal Error (.../src/hotspot/share/code/nmethod.cpp:357), pid=2045346, tid=2045364
#  assert(initial_pc_desc->pc_offset() < 0) failed: must be sentinel


Command Line: -Xlog:init -DautoQuit=true -Dspring.output.ansi.enabled=NEVER -Dserver.port=0 --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xlog:scc*=warning,cds:file=SpringPetClinic.production.log -XX:CacheDataStore=SpringPetClinic.cds -Xlog:scc=error -XX:-LoadCachedCode org.springframework.samples.petclinic.PetClinicApplication

Current CompileTask:
C1:   F195 C0 Q0 S4  323         2       java.lang.String::isLatin1 (19 bytes)

Stack: [0x0000ffff76587000,0x0000ffff76785000],  sp=0x0000ffff76782490,  free space=2029k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1315770]  nmethod::nmethod(Method*, CompilerType, int, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, CompLevel, SCCEntry*, char*, int, JVMCINMethodData*)+0x670  (nmethod.cpp:357)
V  [libjvm.so+0x1317bd4]  nmethod::new_nmethod(methodHandle const&, int, int, CodeOffsets*, int, DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, CompLevel, SCCEntry*, char*, int, JVMCINMethodData*)+0x250  (nmethod.cpp:596)
V  [libjvm.so+0x7e8808]  ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, bool, bool, bool, bool, bool, int, bool, RTMState, SCCEntry*)+0x328  (ciEnv.cpp:1150)
V  [libjvm.so+0x657240]  Compilation::install_code(int)+0x11c  (c1_Compilation.cpp:429)
V  [libjvm.so+0x65b158]  Compilation::compile_method()+0x328  (c1_Compilation.cpp:493)
V  [libjvm.so+0x65b680]  Compilation::Compilation(AbstractCompiler*, ciEnv*, ciMethod*, int, BufferBlob*, bool, DirectiveSet*)+0x25c  (c1_Compilation.cpp:614)
V  [libjvm.so+0x65d488]  Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x138  (c1_Compiler.cpp:276)
V  [libjvm.so+0x92fea8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa18  (compileBroker.cpp:2570)
V  [libjvm.so+0x931d50]  CompileBroker::compiler_thread_loop()+0x56c  (compileBroker.cpp:2222)
V  [libjvm.so+0xdd20e8]  JavaThread::thread_main_inner()+0xe4  (javaThread.cpp:723)
V  [libjvm.so+0x1633dbc]  Thread::call_run()+0xac  (thread.cpp:226)
V  [libjvm.so+0x1399b38]  thread_native_entry(Thread*)+0x168  (os_linux.cpp:789)
C  [libpthread.so.0+0x7928]  start_thread+0x188


Comments
Changeset: 811bad88 Author: Vladimir Kozlov <vladimir.kozlov@oracle.com> Date: 2024-04-19 19:15:45 +0000 URL: https://git.openjdk.org/leyden/commit/811bad8841ac532c23fda441492ad9e757f9ee96
20-04-2024

It is bug in mainline from day one of HotSpot: initial_pc_desc points to not-initialized memory in CodeCache (before PCDesc data is copied into nmethod). I will fix it as part of JDK-8330181.
19-04-2024