JDK-8283587 : [BACKOUT] Invalid generic signature for redefined classes
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 19
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-03-23
  • Updated: 2022-03-25
  • Resolved: 2022-03-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 masterFixed
Related Reports
Relates :  
Relates :  
Description
The following two tests failed in the JDK19 CI:

serviceability/jvmti/RedefineClasses/TestRedefineCondy.java
serviceability/jvmti/RedefineClasses/TestMultipleClasses.java

Here's a snippet from the the TestRedefineCondy.java log file:

----------System.err:(15/884)----------
java.lang.NoClassDefFoundError: jdk/test/lib/helpers/ClassFileInstaller$Manifest
	at RedefineClassHelper.main(RedefineClassHelper.java:69)
	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)
Caused by: java.lang.ClassNotFoundException: jdk.test.lib.helpers.ClassFileInstaller$Manifest
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 5 more

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

result: Failed. Execution failed: `main' threw exception: java.lang.NoClassDefFoundError: jdk/test/lib/helpers/ClassFileInstaller$Manifest


Here's a log file snippet from the TestMultipleClasses.java log file:

----------System.err:(15/884)----------
java.lang.NoClassDefFoundError: jdk/test/lib/helpers/ClassFileInstaller$Manifest
	at RedefineClassHelper.main(RedefineClassHelper.java:69)
	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)
Caused by: java.lang.ClassNotFoundException: jdk.test.lib.helpers.ClassFileInstaller$Manifest
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 5 more

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

result: Failed. Execution failed: `main' threw exception: java.lang.NoClassDefFoundError: jdk/test/lib/helpers/ClassFileInstaller$Manifest
Comments
The [BACKOUT] was integrated in jdk-19+16-957.
25-03-2022

Changeset: 5cf580e0 Author: Alex Menkov <amenkov@openjdk.org> Date: 2022-03-24 04:41:38 +0000 URL: https://git.openjdk.java.net/jdk/commit/5cf580e0fb57245c43c9c719b9b03baa323f2245
24-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7934 Date: 2022-03-24 01:31:42 +0000
24-03-2022

I think it is a test problem. We've seen a similar issue before. Check https://bugs.openjdk.java.net/issues/?jql=text%20~%20%22RedefineClassHelper%22 Not sure I understand the root cause of the failure, Might be the problem is not only in this test. However, it is enough to remove/disable this test only.
24-03-2022

Was able to reproduce it locally (win-x64-debug) The strange thing in test-support/jtreg_open_test_hotspot_jtreg_serviceability_jvmti_RedefineClasses/serviceability/jvmti/RedefineClasses directories for all passed tests are named like <testname>.d, and for failed test just <testname>: - RedefineObject.d - passed - RedefinePreviousVersions - failed Also for the failed test corresponding test-support/jtreg_open_test_hotspot_jtreg_serviceability_jvmti_RedefineClasses/classes/2/test/lib contains only RedefineClassHelper.class file. For other passed tests the directory contains subdirectories (jdk/test/lib/helpers) with compiled ClassFileInstaller and ClassFileInstaller$Manifest class files
24-03-2022

New failure: serviceability/jvmti/RedefineClasses/TestAddDeleteMethods.java ----------System.err:(17/1147)---------- java.lang.NoClassDefFoundError: jdk/test/lib/compiler/InMemoryJavaCompiler at RedefineClassHelper.redefineClass(RedefineClassHelper.java:50) at TestAddDeleteMethods.main(TestAddDeleteMethods.java:195) 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.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:828) Caused by: java.lang.ClassNotFoundException: jdk.test.lib.compiler.InMemoryJavaCompiler at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 6 more
23-03-2022

Added noreg-self label as it is a test issue with a big probability.
23-03-2022

[~amenkov] - Can you take a look at these intermittent Tier1 failures?
23-03-2022

The jdk-19+15-947-tier1 build ID does contain a JVM/TI RedefineClasses related fix: JDK-8282241 Invalid generic signature for redefined classes but I don't see an obvious connection to the failure mode that we're seeing here.
23-03-2022