JDK-8314250 : CDS dump error message: Invoker type parameter must start and end with Object: L3I_L
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-15
  • Updated: 2024-03-19
  • Resolved: 2024-03-11
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 23
23 b14Fixed
Related Reports
Relates :  
Relates :  
Description
When running https://github.com/openjdk/jdk/blob/b7dee213dfb2d0ec4e22837898bf4837c1fe523d/test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java

The log file for -Xshare:dump shows

[0.379s][error  ][cds           ] java.lang.RuntimeException: Invoker type parameter must start and end with Object: L3I_L
[0.379s][error  ][cds           ] Failed to generate LambdaForm holder classes. Is your classlist out of date?
[0.379s][info   ][cds           ] Regenerate MethodHandle Holder classes...done
[0.411s][info   ][cds           ] Rewriting and linking classes: done

We should investigate why this error message is printed
Comments
Changeset: 41450e94 Author: Calvin Cheung <ccheung@openjdk.org> Date: 2024-03-11 20:49:20 +0000 URL: https://git.openjdk.org/jdk/commit/41450e94059bbdf9ee798a1fc78ef14602319567
11-03-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17953 Date: 2024-02-21 19:10:16 +0000
06-03-2024

One way of fixing it is during dumping a classlist, check if an invoker can be archived. If not, don't write the invoker info into the classlist, i.e. don't call logLambdaFormInvoker(). See attached diff.
08-02-2024

The RuntimeException was thrown from: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java#L132-L148 The following check failed: if (mt.parameterCount() < 2 || mt.parameterType(0) != Object.class || mt.parameterType(lastParam) != Object.class) { With the MethodHandlesInvokersTest.java test, the checking of mt.parameterType(lastParam) != Object.class failed. The mt.parameterType(lastParam) is of type int. Entries like the following in the classlist are causing the check failure: @lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder exactInvoker L3I_L @lambda-form-invoker [LF_RESOLVE] java.lang.invoke.Invokers$Holder invoker L3I_L
07-02-2024