Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245514

appcds/XShareAutoWithChangedJar.java failed "assert(_reserved >= sz) failed: Negative amount"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows

      Description

      The following test failed in the JDK15 CI:

      runtime/cds/appcds/XShareAutoWithChangedJar.java

      Here's a snippet from the log file:

      ----------System.err:(47/3358)*----------
       stdout: [[0.050s][info][cds] trying to map T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\\scratch\\3\\appcds-22h26m45s277.jsa
      [0.051s][info][cds] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
      [0.051s][info][cds] Try to map archive(s) at an alternative address
      [0.051s][debug][cds] Reserved archive_space_rs [0x000001f4af6d0000 - 0x000001f4b0250000] (12058624) bytes
      [0.051s][debug][cds] Reserved class_space_rs [0x000001f4b0250000 - 0x000001f4f0250000] (1073741824) bytes
      [0.051s][info ][cds] Commit static region #0 at base 0x000001f4af6d0000 top 0x000001f4af6e0000 (MiscCode) exec
      [0.051s][info ][cds] Mapped static region #0 at base 0x000001f4af6d0000 top 0x000001f4af6e0000 (MiscCode)
      [0.051s][info ][cds] Commit static region #1 at base 0x000001f4af6e0000 top 0x000001f4afb10000 (ReadWrite)
      [0.055s][info ][cds] Mapped static region #1 at base 0x000001f4af6e0000 top 0x000001f4afb10000 (ReadWrite)
      [0.055s][info ][cds] Commit static region #2 at base 0x000001f4afb10000 top 0x000001f4b0250000 (ReadOnly)
      [0.061s][info ][cds] Mapped static region #2 at base 0x000001f4afb10000 top 0x000001f4b0250000 (ReadOnly)
      [0.071s][info ][cds] UseSharedSpaces: A jar file is not the one used while building the shared archive file: T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\\classes\\1\\runtime\\cds\\appcds\\XShareAutoWithChangedJar.d\\XShareAutoWithChangedJar.jar
      [0.071s][debug][cds] Released shared space (archive+classes) 0x000001f4af6d0000
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=\\services/virtualMemoryTracker.hpp:57
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (t:\\workspace\\open\\src\\hotspot\\share\\services/virtualMemoryTracker.hpp:57), pid=7528, tid=3052
      # assert(_reserved >= sz) failed: Negative amount
      #
      # JRE version: (15.0+24) (fastdebug build )
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-ea+24-1166, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64)
      # Core dump will be written. Default location: T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\\scratch\\3\\hs_err_pid7528.mdmp
      #
      # An error report file with more information is saved as:
      # T:\\testoutput\\test-support\\jtreg_open_test_hotspot_jtreg_hotspot_cds_relocation\\scratch\\3\\hs_err_pid7528.log
      #
      #
      ];
       stderr: []
       exitValue = 1

      java.lang.RuntimeException: 'Hello World' missing from stdout/stderr

      at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:196)
      at XShareAutoWithChangedJar.main(XShareAutoWithChangedJar.java:49)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
      at java.base/java.lang.Thread.run(Thread.java:832)

      JavaTest Message: Test threw exception: java.lang.RuntimeException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Hello World' missing from stdout/stderr


      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'Hello World' missing from stdout/stderr

      Here's the crashing thread's stack:

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

      Current thread (0x000001f48ca129f0): JavaThread "Unknown thread" [_thread_in_vm, id=3052, stack(0x0000000816900000,0x0000000816a00000)]

      Stack: [0x0000000816900000,0x0000000816a00000]
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [jvm.dll+0xa320b1] os::platform_print_native_stack+0xf1 (os_windows_x86.cpp:369)
      V [jvm.dll+0xc443c6] VMError::report+0xf86 (vmError.cpp:729)
      V [jvm.dll+0xc45bbe] VMError::report_and_die+0x7ee (vmError.cpp:1528)
      V [jvm.dll+0xc46274] VMError::report_and_die+0x64 (vmError.cpp:1321)
      V [jvm.dll+0x431ec7] report_vm_error+0x117 (debug.cpp:264)
      V [jvm.dll+0xc3a4a3] VirtualMemorySummary::record_released_memory+0x73 (virtualMemoryTracker.hpp:146)
      V [jvm.dll+0xc3a71b] VirtualMemoryTracker::remove_released_region+0x16b (virtualMemoryTracker.cpp:466)
      V [jvm.dll+0xa2256a] os::release_memory+0x8a (os.cpp:1755)
      V [jvm.dll+0xc40b31] ReservedSpace::release+0x41 (virtualspace.cpp:277)
      V [jvm.dll+0x9a7930] MetaspaceShared::map_archives+0x530 (metaspaceShared.cpp:2241)
      V [jvm.dll+0x9a6b70] MetaspaceShared::initialize_runtime_shared_and_meta_spaces+0x1b0 (metaspaceShared.cpp:2092)
      V [jvm.dll+0x99df05] Metaspace::global_initialize+0x45 (metaspace.cpp:1241)
      V [jvm.dll+0xc09f46] universe_init+0x176 (universe.cpp:666)
      V [jvm.dll+0x5df900] init_globals+0x90 (init.cpp:117)
      V [jvm.dll+0xbdb879] Threads::create_vm+0x789 (thread.cpp:3887)
      V [jvm.dll+0x6b80de] JNI_CreateJavaVM_inner+0xbe (jni.cpp:3776)
      V [jvm.dll+0x6baf5f] JNI_CreateJavaVM+0x1f (jni.cpp:3859)
      C [jli.dll+0x53f7] JavaMain+0x113 (java.c:417)
      C [ucrtbase.dll+0x21ffa]
      C [KERNEL32.DLL+0x17974]
      C [ntdll.dll+0x6a261]

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stuefe Thomas Stuefe
                Reporter:
                dcubed Daniel Daugherty
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: