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

CDS ArchivedEnumTest.java fails: object points to a static field that may be reinitialized

    XMLWordPrintable

Details

    • b12
    • generic
    • generic
    • Verified

    Description

      The following test failed in the JDK20 CI:

      runtime/cds/appcds/cacheObject/ArchivedEnumTest.java

      Here's a snippet from the log file:

      #section:driver
      ----------messages:(5/150)----------
      command: driver ArchivedEnumTest
      reason: User specified action: run driver ArchivedEnumTest
      Mode: agentvm
      Agent id: 13
      elapsed time (seconds): 1.443
      ----------configuration:(18/2597)----------

      <snip>

      ----------System.out:(11/4642)----------
      Command line: [/opt/mach5/mesos/work_dir/jib-master/install/jdk-20+11-642/linux-aarch64-debug.jdk/jdk-20/fastdebug/bin/java -cp /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/3/runtime/cds/appcds/cacheObject/ArchivedEnumTest.d:/opt/mach5/mesos/work_dir/jib-master/install/jdk-20+11-642/src.full/open/test/hotspot/jtreg/runtime/cds/appcds/cacheObject:/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/3/test/lib:/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/classes/3/test/hotspot/jtreg/runtime/cds/appcds:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/javatest.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jtreg.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/junit.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/hamcrest.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/testng.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/jcommander.jar:/opt/mach5/mesos/work_dir/jib-master/install/jtreg/6.1/1/bundles/jtreg-6.1+1.zip/jtreg/lib/guice.jar -XX:MaxRAMPercentage=6.25 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/tmp -cp /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/ArchivedEnumApp.jar -Xshare:dump -Xlog:cds -XX:SharedArchiveFile=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/appcds-20h03m46s952.jsa -XX:ExtraSharedClassListFile=/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/runtime.cds.appcds.cacheObject.ArchivedEnumTest.java-test.classlist ]
      [2022-08-16T20:03:46.997203145Z] Gathering output for process 1431910
      [ELAPSED: 1262 ms]
      [logging stdout to /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/runtime.cds.appcds.cacheObject.ArchivedEnumTest.java-0000-dump.stdout]
      [logging stderr to /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/runtime.cds.appcds.cacheObject.ArchivedEnumTest.java-0000-dump.stderr]
      [STDERR]

      [2022-08-16T20:03:48.259513650Z] Waiting for completion for process 1431910
      [2022-08-16T20:03:48.259828049Z] Waiting for completion finished for process 1431910
      [2022-08-16T20:03:48.259940129Z] Waiting for completion for process 1431910
      [2022-08-16T20:03:48.259983369Z] Waiting for completion finished for process 1431910
      ----------System.err:(86/6220)----------
       stdout: [[0.013s][info][cds] Core region alignment: 65536
      [0.078s][info][cds] JVM_StartThread() ignored: java.lang.ref.Reference$ReferenceHandler
      [0.078s][info][cds] JVM_StartThread() ignored: java.lang.ref.Finalizer$FinalizerThread
      [0.124s][info][cds] JVM_StartThread() ignored: jdk.internal.misc.InnocuousThread
      [0.157s][info][cds] Loading classes to share ...
      [0.407s][info][cds] Loading classes to share: done.
      [0.407s][info][cds] Shared spaces: preloaded 1322 classes
      [0.408s][info][cds] Rewriting and linking classes ...
      [0.408s][info][cds] Regenerate MethodHandle Holder classes...
      [0.631s][info][cds] Regenerate MethodHandle Holder classes...done
      [0.653s][info][cds] Rewriting and linking classes: done
      [0.655s][info][cds] Run GC ...
      [0.730s][info][cds] Run GC done
      [0.732s][info][cds] Gathering all archivable objects ...
      [0.732s][info][cds] Gathering classes and symbols ...
      [0.856s][info][cds] Sorting symbols and fixing identity hash ...
      [0.860s][info][cds] Sorting classes ...
      [1.018s][info][cds] _estimated_hashtable_bytes = 386240 + 40624 = 426864
      [1.018s][info][cds] _estimated_metaspaceobj_bytes = 222733376
      [1.018s][info][cds] total estimate bytes = 223291312
      [1.018s][info][cds] Reserved output buffer space at 0x0000fffe16b00000 [223346688 bytes]
      [1.018s][info][cds] Allocating RW objects ...
      [1.032s][info][cds] done (28119 objects)
      [1.032s][info][cds] Allocating RO objects ...
      [1.074s][info][cds] done (81057 objects)
      [1.074s][info][cds] Relocating embedded pointers in core regions ...
      [1.132s][info][cds] Heap range = [0x0000000084000000 - 0x0000000100000000]
      [1.132s][info][cds] Dumping objects to closed archive heap region ...
      [1.144s][info][cds] Dumping objects to open archive heap region ...
      [1.174s][info][cds] archived obj roots[2275] = 1140 words, klass = 0x100059da0, obj = 0xffe76340
      [1.177s][warning][cds,heap] Archive heap points to a static field that may be reinitialized at runtime:
      [1.177s][warning][cds,heap] Field: java/lang/reflect/AccessFlag$Location::EMPTY_SET
      [1.177s][warning][cds,heap] Value: java.util.ImmutableCollections$SetN
      [1.177s][warning][cds,heap] {0x0000000084115ad0} - klass: 'java/util/ImmutableCollections$SetN'
      [1.177s][warning][cds,heap] - ---- fields (total size 3 words):
      [1.177s][warning][cds,heap] - final synchronized 'size' 'I' @12 0
      [1.177s][warning][cds,heap] - final synchronized 'elements' '[Ljava/lang/Object;' @16 a 'java/lang/Object'[0] {0x0000000084115ae8} (84115ae8)
      [1.177s][warning][cds,heap] --- trace begin ---
      [1.177s][warning][cds,heap] [ 0] {0x0000000084193f68} jdk.internal.module.ArchivedModuleGraph::finder (offset = 16)
      [1.177s][warning][cds,heap] [ 1] {0x0000000084171ca0} jdk.internal.module.SystemModuleFinders$SystemModuleFinder::mrefs (offset = 12)
      [1.177s][warning][cds,heap] [ 2] {0x0000000084171cb8} java.util.ImmutableCollections$SetN::elements (offset = 16)
      [1.177s][warning][cds,heap] [ 3] {0x0000000084171cd0} [Ljava.lang.Object; @[1]
      [1.177s][warning][cds,heap] [ 4] {0x000000008416ecd8} jdk.internal.module.ModuleReferenceImpl::descriptor (offset = 12)
      [1.177s][warning][cds,heap] [ 5] {0x000000008415f948} java.lang.module.ModuleDescriptor::modifiers (offset = 32)::opens (offset = 44)
      [1.177s][warning][cds,heap] [ 6] {0x0000000084115ad0} java.util.ImmutableCollections$SetN
      [1.177s][warning][cds,heap] --- trace end ---
      [1.177s][warning][cds,heap]
      [1.177s][warning][cds,heap] Scanned 23853 objects. Found 1 case(s) where an object points to a static field that may be reinitialized at runtime.
      [1.180s][info ][cds ] Relocating external roots ...
      [1.182s][info ][cds ] done
      [1.182s][info ][cds ] Dumping symbol table ...
      [1.208s][info ][cds ] Relocating vmClasses::_klasses[] ...
      [1.208s][info ][cds ] Make classes shareable
      [1.223s][info ][cds ] Number of classes 1486
      [1.223s][info ][cds ] instance classes = 1367
      [1.223s][info ][cds ] boot = 1366
      [1.223s][info ][cds ] app = 1
      [1.223s][info ][cds ] platform = 0
      [1.223s][info ][cds ] unregistered = 0
      [1.223s][info ][cds ] (hidden) = 91
      [1.223s][info ][cds ] (unlinked) = 0
      [1.223s][info ][cds ] obj array classes = 110
      [1.223s][info ][cds ] type array classes = 9
      [1.223s][info ][cds ] symbols = 41398
      [1.230s][info ][cds ] Dumping shared data to file:
      [1.230s][info ][cds ] /opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S65203/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/23099d70-9761-4af7-aafd-747dc79940b2/runs/907e655f-1254-41ba-ade5-c755c1ee1560/testoutput/test-support/jtreg_open_test_hotspot_jtreg_hotspot_tier2_runtime/scratch/2/appcds-20h03m46s952.jsa
      [1.235s][info ][cds ] Shared file region (rw ) 0: 5245816 bytes, addr 0x0000000800000000 file offset 0x00010000 crc 0x2765ad12
      [1.243s][info ][cds ] Shared file region (ro ) 1: 8333776 bytes, addr 0x0000000800510000 file offset 0x00520000 crc 0x4db2effd
      [1.244s][info ][cds ] Shared file region (bm ) 2: 247976 bytes, addr 0x0000000000000000 file offset 0x00d20000 crc 0x1d7cc043
      [1.245s][info ][cds ] Shared file region (ca0) 3: 589824 bytes, addr 0x00000000fff00000 file offset 0x00d60000 crc 0x32a1c991
      [1.245s][info ][cds ] Shared file region (oa0) 5: 524288 bytes, addr 0x00000000ffe00000 file offset 0x00df0000 crc 0xcc384f11
      ];
       stderr: []
       exitValue = 0

      java.lang.RuntimeException: 'object points to a static field that may be reinitialized at runtime' found in stdout
      at jdk.test.lib.process.OutputAnalyzer.shouldNotContain(OutputAnalyzer.java:267)
      at ArchivedEnumTest.main(ArchivedEnumTest.java:49)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:578)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:312)
      at java.base/java.lang.Thread.run(Thread.java:1589)

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

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'object points to a static field that may be reinitialized at runtime' found in stdout

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              dcubed Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: