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

CDS SignedJar.java test fails due to archived Reference object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 19
    • 17, 19
    • hotspot
    • b18
    • x86_64
    • linux_ubuntu

    Description

      STDOUT:
      executeProcess: /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/keytool -genkey -keystore ./keystore -alias mykey -storepass abc123 -keypass abc123 -keyalg dsa -dname CN=jvmtest
      [2022-04-05T09:39:32.942914416Z] Gathering output for process 696582
      [2022-04-05T09:39:34.034233336Z] Waiting for completion for process 696582
      [2022-04-05T09:39:34.034462245Z] Waiting for completion finished for process 696582
      Output and diagnostic info for process 696582 was saved into 'pid-696582-output.log'
      [2022-04-05T09:39:34.048767316Z] Waiting for completion for process 696582
      [2022-04-05T09:39:34.048848729Z] Waiting for completion finished for process 696582
      executeProcess: /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/jarsigner -keystore ./keystore -storepass abc123 -keypass abc123 -signedjar /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/signed_hello.jar /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/hello.jar mykey
      [2022-04-05T09:39:34.050028910Z] Gathering output for process 696608
      [2022-04-05T09:39:35.202469484Z] Waiting for completion for process 696608
      [2022-04-05T09:39:35.202659921Z] Waiting for completion finished for process 696608
      Output and diagnostic info for process 696608 was saved into 'pid-696608-output.log'
      [2022-04-05T09:39:35.203191347Z] Waiting for completion for process 696608
      [2022-04-05T09:39:35.203272158Z] Waiting for completion finished for process 696608
      Command line: [/home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/images/jdk/bin/java -cp /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/classes/0/runtime/cds/appcds/SignedJar.d:/home/turbanoff/Projects/official_jdk/test/hotspot/jtreg/runtime/cds/appcds:/home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/classes/0/test/lib:/home/turbanoff/Projects/jtreg/lib/javatest.jar:/home/turbanoff/Projects/jtreg/lib/jtreg.jar:/home/turbanoff/Projects/jtreg/lib/junit.jar:/home/turbanoff/Projects/jtreg/lib/hamcrest.jar:/home/turbanoff/Projects/jtreg/lib/testng.jar:/home/turbanoff/Projects/jtreg/lib/jcommander.jar:/home/turbanoff/Projects/jtreg/lib/guice.jar -XX:MaxRAMPercentage=12.5 -Djava.io.tmpdir=/home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/tmp -cp /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/signed_hello.jar -Xshare:dump -Xlog:cds -XX:SharedArchiveFile=/home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/appcds-12h39m35s209.jsa -XX:ExtraSharedClassListFile=/home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/runtime.cds.appcds.SignedJar.java-test.classlist -Xlog:cds+class=debug Hello dummy ]
      [2022-04-05T09:39:35.221153690Z] Gathering output for process 696634
      [ELAPSED: 2012 ms]
      [logging stdout to /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/runtime.cds.appcds.SignedJar.java-0000-dump.stdout]
      [logging stderr to /home/turbanoff/Projects/official_jdk/build/linux-x86_64-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_cds_appcds_SignedJar_java/scratch/0/runtime.cds.appcds.SignedJar.java-0000-dump.stderr]
      [STDERR]

      [2022-04-05T09:39:37.235029464Z] Waiting for completion for process 696634
      [2022-04-05T09:39:37.235245950Z] Waiting for completion finished for process 696634
      [2022-04-05T09:39:37.235883134Z] Waiting for completion for process 696634
      [2022-04-05T09:39:37.235973984Z] Waiting for completion finished for process 696634
      STDERR:
       stdout: [[0.007s][info][cds] Core region alignment: 4096
      [0.043s][info][cds] JVM_StartThread() ignored: java.lang.ref.Reference$ReferenceHandler
      [0.043s][info][cds] JVM_StartThread() ignored: java.lang.ref.Finalizer$FinalizerThread
      [0.093s][info][cds] Loading classes to share ...
      [0.235s][info][cds] JVM_StartThread() ignored: jdk.internal.misc.InnocuousThread
      [1.210s][info][cds] Loading classes to share: done.
      [1.210s][info][cds] Shared spaces: preloaded 1263 classes
      [1.211s][info][cds] Rewriting and linking classes ...
      [1.211s][info][cds] Regenerate MethodHandle Holder classes...
      [1.540s][info][cds] Regenerate MethodHandle Holder classes...done
      [1.559s][info][cds] Rewriting and linking classes: done
      [1.561s][info][cds] Run GC ...
      [1.639s][info][cds] Run GC done
      [1.639s][warning][cds] Skipping jdk/internal/event/Event: JFR event class
      [1.640s][warning][cds] Skipping jdk/internal/event/X509CertificateEvent: JFR event class
      [1.640s][warning][cds] Skipping Hello: Signed JAR
      [1.643s][info ][cds] Gathering all archivable objects ...
      [1.643s][info ][cds] Gathering classes and symbols ...
      [1.743s][info ][cds] Sorting symbols and fixing identity hash ...
      [1.748s][info ][cds] Sorting classes ...
      [1.903s][info ][cds] _estimated_hashtable_bytes = 434488 + 44832 = 479320
      [1.903s][info ][cds] _estimated_metaspaceobj_bytes = 224111928
      [1.903s][info ][cds] total estimate bytes = 224599440
      [1.903s][info ][cds] Reserved output buffer space at 0x00007f77429ce000 [224600064 bytes]
      [1.904s][info ][cds] Allocating RW objects ...
      [1.918s][info ][cds] done (31361 objects)
      [1.918s][info ][cds] Allocating RO objects ...
      [1.932s][info ][cds] done (90286 objects)
      [1.932s][info ][cds] Relocating embedded pointers in core regions ...
      [1.970s][info ][cds] Heap range = [0x00000000b2200000 - 0x0000000100000000]
      [1.970s][info ][cds] Dumping objects to closed archive heap region ...
      [1.981s][info ][cds] Dumping objects to open archive heap region ...
      [1.995s][error ][cds,heap] Cannot archive object of class java.lang.invoke.MethodHandleNatives$CallSiteContext
      ];
       stderr: []
       exitValue = 1

      java.lang.RuntimeException: Expected to get exit value of [0]

      at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAnalyzer.java:489)
      at jdk.test.lib.cds.CDSTestUtils.checkDump(CDSTestUtils.java:280)
      at SignedJar.main(SignedJar.java:59)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:828)

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: