JDK-8349122 : -XX:+AOTClassLinking is not compatible with jdwp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-31
  • Updated: 2025-02-10
  • Resolved: 2025-01-31
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 24 JDK 25
24Fixed 25 b09Fixed
Related Reports
Blocks :  
Description
Some jdwp testing failures are found when running with an AOT cache created with -XX:+AOTClassLinking.

It's unclear what the exact cause is. Maybe the test cases use a JDWP agent that assumes certain classes are NOT yet loaded, when in fact those classes are loaded during JVM bootstrap due to the use of the AOT cache.

Proposal:
If an AOT cache  was created with -XX:+AOTClassLinking, do not load it when -agent:jdwp.... is detected from the command-line

Justification:
Since AOT cache is an optimization feature, it's OK to disable this optimization when jdwp is required.

Comments
A pull request was submitted for review. Branch: jdk24 URL: https://git.openjdk.org/jdk/pull/23381 Date: 2025-01-31 05:45:16 +0000
31-01-2025

Changeset: 03f5c33b Branch: master Author: Ioi Lam <iklam@openjdk.org> Date: 2025-01-31 05:37:38 +0000 URL: https://git.openjdk.org/jdk/commit/03f5c33b53749ed7a1ee04d908909ce1e761477f
31-01-2025

Fix request for JDK24 approved.
31-01-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23378 Date: 2025-01-31 01:33:21 +0000
31-01-2025

Changing priority to P2 as this bug is blocking the integration of P2 bug JDK-8348752
31-01-2025