JDK-8313905 : Checked_cast assert in CDS compare_by_loader
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-08
  • Updated: 2024-12-30
  • Resolved: 2023-08-10
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 21 JDK 22
21.0.7-oracleFixed 22 b11Fixed
Related Reports
Relates :  
Description
Test: runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java#custom-cl-zgc-generational

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (c:\sb\prod\1691399875\workspace\open\src\hotspot\share\utilities/globalDefinitions.hpp:505), pid=8704, tid=9196
#  assert(static_cast<T1>(result) == thing) failed: must be
#
# JRE version: Java(TM) SE Runtime Environment (22.0+10) (fastdebug build 22-ea+10-667)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 22-ea+10-667, mixed mode, sharing, tiered, compressed class ptrs, z gc, windows-amd64)
# Core dump will be written. Default location: C:\sb\prod\1691408103\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_runtime\scratch\0\hs_err_pid8704.mdmp
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#

---------------  S U M M A R Y ------------

Command Line: -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=c:\ade\mesos\work_dir\jib-master\install\jdk\20\36\bundles\windows-x64\jdk-20_windows-x64_bin.zip\jdk-20 -Djava.io.tmpdir=c:\sb\prod\1691408103\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_runtime\tmp -XX:+CreateCoredumpOnCrash -XX:+CreateCoredumpOnCrash -XX:+UseZGC -XX:ArchiveClassesAtExit=C:\sb\prod\1691408103\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_runtime\scratch\0\appcds-11h39m27s403.jsa -Xshare:auto --add-modules=java.base,jdk.httpserver --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -Xlog:cds=debug,class+load,class+loader+constraints -XX:+UseZGC -XX:+ZGenerational -XX:ZCollectionInterval=0.01 CustomAppLoader C:\sb\prod\1691408103\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_runtime\scratch\0\loader_constraints.jar LoaderConstraintsApp 3

Host:  AMD EPYC 7J13 64-Core Processor                , 12 cores, 23G,  Windows Server 2019 , 64 bit Build 17763 (10.0.17763.475)
Time: Mon Aug  7 12:39:28 2023 /GM elapsed time: 0.964540 seconds (0d 0h 0m 0s)

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

Current thread (0x000002617efab810):  VMThread "VM Thread"          [id=9196, stack(0x000000d942d00000,0x000000d942e00000) (1024K)]

Stack: [0x000000d942d00000,0x000000d942e00000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0xc6b5b1]  os::win32::platform_print_native_stack+0x101  (os_windows_x86.cpp:236)
V  [jvm.dll+0xf0bbfc]  VMError::report+0x146c  (vmError.cpp:997)
V  [jvm.dll+0xf0e055]  VMError::report_and_die+0x645  (vmError.cpp:1811)
V  [jvm.dll+0xf0e764]  VMError::report_and_die+0x64  (vmError.cpp:1576)
V  [jvm.dll+0x549b2b]  report_vm_error+0x5b  (debug.cpp:191)
V  [jvm.dll+0xe40356]  UnregisteredClassesDuplicationChecker::compare_by_loader+0x86  (systemDictionaryShared.cpp:602)
C  [ucrtbase.dll+0xedea]  (no source info available)
V  [jvm.dll+0xe3f01e]  SystemDictionaryShared::check_excluded_classes+0x25e  (systemDictionaryShared.cpp:634)
V  [jvm.dll+0x5fb011]  DynamicArchiveBuilder::doit+0xc1  (dynamicArchive.cpp:115)
V  [jvm.dll+0x5fba2f]  VM_PopulateDynamicDumpSharedSpace::doit+0x4f  (dynamicArchive.cpp:393)
V  [jvm.dll+0xf15903]  VM_Operation::evaluate+0xd3  (vmOperations.cpp:72)
V  [jvm.dll+0xf172c6]  VMThread::evaluate_operation+0x96  (vmThread.cpp:282)
V  [jvm.dll+0xf17a23]  VMThread::inner_execute+0x253  (vmThread.cpp:438)
V  [jvm.dll+0xf17dc4]  VMThread::run+0x104  (vmThread.cpp:175)
V  [jvm.dll+0xe760dd]  Thread::call_run+0x1cd  (thread.cpp:222)
V  [jvm.dll+0xc69892]  os::win32::thread_native_entry+0xa2  (os_windows.cpp:554)
C  [ucrtbase.dll+0x2268a]  (no source info available)
C  [KERNEL32.DLL+0x17974]  (no source info available)
C  [ntdll.dll+0x5a0b1]  (no source info available)

VM_Operation (0x000000d9417ff4c0): PopulateDumpSharedSpace, mode: safepoint, requested by thread 0x0000025d7378cb20

Comments
Fix request [21u] I backport this for parity with 21.0.7-oracle. Low to medium risk, simple change, but no good test case. Resolved, backport, probaly clean anyways. Mentioned test passes, but also without the fix. SAP nightly testing passed.
27-12-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1290 Date: 2024-12-25 16:32:39 +0000
25-12-2024

Changeset: bd1b9427 Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2023-08-10 15:25:00 +0000 URL: https://git.openjdk.org/jdk/commit/bd1b9427410c458215e9e89eeff6e4d30592a4a4
10-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15208 Date: 2023-08-09 12:28:50 +0000
09-08-2023

I don't know why the RBP is not in the windows hs_err_file but I can't get the values of the InstanceKlass* whose checked_cast<> failed.
08-08-2023