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

Data is written to file header even if its CRC32 was calculated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16, 17
    • Fix Version/s: 17
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Description

      ## Symptoms
      Many tests under runtime/cds/appcds/dynamicArchive are crashed when turning on VerifySharedSpaces, it reports inconsistent crc32 between dumptime and runtime(See attachments for different header content).

      ## How to reproduce:
      $ jtreg -vmoptions:"-XX:+VerifySharedSpaces" -v:time -conc:64 -timeout:5 -jdk:/your/jdk/ test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/HelloDynamic.java

      ## JTreport
      ----------System.err:(38/2489)----------
       stdout: [[0.005s][info][class,load] opened: /home/qingfeng.yy/openjdk16_so_warning/jdk/build/linux-x86_64-server-slowdebug/images/jdk/lib/modules
      [0.096s][info][cds ] trying to map /home/qingfeng.yy/openjdk16_so_warning/jdk/build/linux-x86_64-server-slowdebug/images/jdk/lib/server/classes.jsa
      [0.096s][info][cds ] Opened archive /home/qingfeng.yy/openjdk16_so_warning/jdk/build/linux-x86_64-server-slowdebug/images/jdk/lib/server/classes.jsa.
      [0.096s][info][cds ] Archive was created with UseCompressedOops = 1, UseCompressedClassPointers = 1
      [0.096s][info][cds ] Core region alignment: 4096
      [0.096s][info][cds ] trying to map /home/qingfeng.yy/openjdk16_so_warning/jdk/JTwork/scratch/0/top-16h45m44s593.jsa
      [0.096s][info][cds ] Opened archive /home/qingfeng.yy/openjdk16_so_warning/jdk/JTwork/scratch/0/top-16h45m44s593.jsa.
      [0.096s][info][cds ] _crc expected: -557112516
      [0.096s][info][cds ] actual: -1295249408
      Error occurred during initialization of VM
      Unable to use shared archive.
      ];
       stderr: [An error has occurred while processing the shared archive file.
      Header checksum verification failed.
      ]
       exitValue = 1

      java.lang.RuntimeException: 'Hello source: shared objects file' missing from stdout/stderr

      at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:206)
      at HelloDynamic.lambda$doTest$1(HelloDynamic.java:77)
      at jdk.test.lib.cds.CDSTestUtils$Result.assertNormalExit(CDSTestUtils.java:145)
      at HelloDynamic.doTest(HelloDynamic.java:76)
      at HelloDynamic.testDefaultBase(HelloDynamic.java:48)
      at DynamicArchiveTestBase.runTest(DynamicArchiveTestBase.java:74)
      at HelloDynamic.main(HelloDynamic.java:41)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:831)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: 'Hello source: shared objects file' missing from stdout/stderr

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yyang Yi Yang
              Reporter:
              yyang Yi Yang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: