AOT cache creation crashes when iterating training data

XMLWordPrintable

    • b17

        Test: runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java#aot

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffb905a8429, pid=23588, tid=2284
        #
        # JRE version: Java(TM) SE Runtime Environment (26.0+14) (fastdebug build 26-ea+14-1431)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+14-1431, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
        # Problematic frame:
        # V [jvm.dll+0x288429] MetaspaceClosure::MSORef<Klass>::msotype+0x19
        #
        # Core dump will be written. Default location: C:\sb\prod\1756982074\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\scratch\2\hs_err_pid23588.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\24\36\bundles\windows-x64\jdk-24_windows-x64_bin.zip\jdk-24 -Djava.io.tmpdir=c:\sb\prod\1756982074\testoutput\test-support\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\tmp -XX:+CreateCoredumpOnCrash -XX:+UnlockDiagnosticVMOptions -XX:ArchiveRelocationMode=0 -Xlog:cds -XX:NativeMemoryTracking=detail -XX:-VerifyDependencies -XX:AOTMode=record -XX:AOTCacheOutput=MethodHandlesPermuteArgumentsTest.aot -Xlog:arguments,class+load=debug,aot=debug,aot+class=debug,cds=debug:file=MethodHandlesPermuteArgumentsTest.aot.log::filesize=0 TestMHApp test.java.lang.invoke.MethodHandlesPermuteArgumentsTest

        Host: AMD EPYC 9J14 96-Core Processor , 12 cores, 23G, Windows Server 2022 , 64 bit Build 20348 (10.0.20348.3451)
        Time: Thu Sep 4 11:48:27 2025 /GM elapsed time: 7.608263 seconds (0d 0h 0m 7s)

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

        Current thread (0x00000194bdd3a6d0): VMThread "VM Thread" [id=2284, stack(0x00000002e9100000,0x00000002e9200000) (1024K)]

        Stack: [0x00000002e9100000,0x00000002e9200000], sp=0x00000002e91feec0, free space=1019k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [jvm.dll+0x288429] MetaspaceClosure::MSORef<Klass>::msotype+0x19 (metaspaceClosure.hpp:201)
        V [jvm.dll+0x2a8c12] ArchiveBuilder::get_follow_mode+0x52 (archiveBuilder.cpp:562)
        V [jvm.dll+0x2a812f] ArchiveBuilder::gather_klass_and_symbol+0x3f (archiveBuilder.cpp:245)
        V [jvm.dll+0xd3712c] MetaspaceClosure::do_push+0x9c (metaspaceClosure.cpp:62)
        V [jvm.dll+0xd374ec] MetaspaceClosure::push_impl+0x5c (metaspaceClosure.cpp:36)
        V [jvm.dll+0x106999e] MetaspaceClosure::MSOArrayRef<CompileTrainingData::ciRecords::ciMemoizedFunction<int,MethodTrainingData *>::Record>::metaspace_pointers_do_at_impl+0x7e (metaspaceClosure.hpp:263)
        V [jvm.dll+0xd37144] MetaspaceClosure::do_push+0xb4 (metaspaceClosure.cpp:66)
        V [jvm.dll+0xd374ec] MetaspaceClosure::push_impl+0x5c (metaspaceClosure.cpp:36)
        V [jvm.dll+0x10694c4] CompileTrainingData::metaspace_pointers_do+0xd4 (trainingData.cpp:762)
        V [jvm.dll+0xd37144] MetaspaceClosure::do_push+0xb4 (metaspaceClosure.cpp:66)
        V [jvm.dll+0xd374ec] MetaspaceClosure::push_impl+0x5c (metaspaceClosure.cpp:36)
        V [jvm.dll+0x1069aa4] MetaspaceClosure::MSOPointerArrayRef<CompileTrainingData>::metaspace_pointers_do_at_impl+0xb4 (metaspaceClosure.hpp:285)
        V [jvm.dll+0xd37144] MetaspaceClosure::do_push+0xb4 (metaspaceClosure.cpp:66)
        V [jvm.dll+0xd374ec] MetaspaceClosure::push_impl+0x5c (metaspaceClosure.cpp:36)
        V [jvm.dll+0x1069566] KlassTrainingData::metaspace_pointers_do+0x86 (trainingData.cpp:742)
        V [jvm.dll+0xd37144] MetaspaceClosure::do_push+0xb4 (metaspaceClosure.cpp:66)
        V [jvm.dll+0xd374ec] MetaspaceClosure::push_impl+0x5c (metaspaceClosure.cpp:36)
        V [jvm.dll+0x10687ef] TrainingData::iterate_roots+0x9f (trainingData.cpp:500)
        V [jvm.dll+0xd3ca09] StaticArchiveBuilder::iterate_roots+0x49 (metaspaceShared.cpp:600)
        V [jvm.dll+0x2a851d] ArchiveBuilder::gather_klasses_and_symbols+0x12d (archiveBuilder.cpp:277)
        V [jvm.dll+0x2a8a65] ArchiveBuilder::gather_source_objs+0x65 (archiveBuilder.cpp:532)
        V [jvm.dll+0xd3ad5e] VM_PopulateDumpSharedSpace::doit+0x14e (metaspaceShared.cpp:676)
        V [jvm.dll+0x10fda47] VM_Operation::evaluate+0xd7 (vmOperations.cpp:75)
        V [jvm.dll+0x10ff7d3] VMThread::evaluate_operation+0xe3 (vmThread.cpp:285)
        V [jvm.dll+0x10ffee7] VMThread::inner_execute+0x247 (vmThread.cpp:424)
        V [jvm.dll+0x11004f4] VMThread::run+0x114 (vmThread.cpp:177)
        V [jvm.dll+0x104e392] Thread::call_run+0x1b2 (thread.cpp:248)
        V [jvm.dll+0xdf48f1] thread_native_entry+0xe1 (os_windows.cpp:562)
        C [ucrtbase.dll+0x26b4c] (no source info available)
        C [KERNEL32.DLL+0x14cb0] (no source info available)
        C [ntdll.dll+0x7edcb] (no source info available)


        siginfo: EXCEPTION_ACCESS_VIOLATION (0xc0000005), reading address 0xffffffffffffffff

              Assignee:
              Igor Veresov
              Reporter:
              David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: