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

8263412 can cause jtreg testlibrary split

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b14

      Description

      after JDK-8263412, we might (again) encounter NCDFE b/c parts of testlibraries aren't on the classpath. this happens when jtreg builds `jdk.test.lib.helpers.ClassFileInstaller` as a part of test-specific code, but `ClassFileInstaller` as part of shared testibrary directory in one test, when in the following test, jtreg sees `ClassFileInstaller` in the shared directory, hence javac won't recompile it/its dependencies, but in runtime `jdk.test.lib.helpers.ClassFileInstaller` is nowhere to be found, hence we get NCDFE.
      TEST: runtime/cds/appcds/customLoader/HelloCustom_JFR.java
      ...
      [2021-03-13T02:00:07,610Z] ClassFileInstaller -jar hello.jar HelloUnload jdk.test.lib.classloader.ClassUnloadCommon 'jdk.test.lib.classloader.ClassUnloadCommon$1' 'jdk.test.lib.classloader.ClassUnloadCommon$TestFailure'
      [2021-03-13T02:00:07,610Z] STDERR:
      [2021-03-13T02:00:07,610Z] java.lang.NoClassDefFoundError: jdk/test/lib/helpers/ClassFileInstaller
      [2021-03-13T02:00:07,610Z] at ClassFileInstaller.main(ClassFileInstaller.java:63)
      [2021-03-13T02:00:07,610Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [2021-03-13T02:00:07,610Z] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
      [2021-03-13T02:00:07,610Z] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [2021-03-13T02:00:07,610Z] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      [2021-03-13T02:00:07,610Z] at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
      [2021-03-13T02:00:07,610Z] at java.base/java.lang.Thread.run(Thread.java:831)
      [2021-03-13T02:00:07,610Z] Caused by: java.lang.ClassNotFoundException: jdk.test.lib.helpers.ClassFileInstaller
      [2021-03-13T02:00:07,610Z] at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:432)
      [2021-03-13T02:00:07,610Z] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:586)
      [2021-03-13T02:00:07,610Z] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
      [2021-03-13T02:00:07,610Z] ... 7 more
      [2021-03-13T02:00:07,610Z]
      [2021-03-13T02:00:07,610Z] JavaTest Message: Test threw exception: java.lang.NoClassDefFoundError
      [2021-03-13T02:00:07,610Z] JavaTest Message: shutting down test

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              iignatyev Igor Ignatyev (Inactive)
              Reporter:
              iignatyev Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: