JDK-8255934 : JConsole 14 and greater fails to connect to older JVM
  • Type: Bug
  • Component: tools
  • Sub-Component: jconsole
  • Affected Version: 8,11,14,15,16
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2020-11-04
  • Updated: 2021-05-25
  • Resolved: 2020-11-20
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 16
16 b26Fixed
Related Reports
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Server VM is OpenJDK Java 8 on RHEL 7.4 and the JConsole was Java 15 on Mac OS.

A DESCRIPTION OF THE PROBLEM :
When you connect JConsole that ships with Java 15 to a VM running an older version of Java like Java 8 for example it attempts to access an attribute called TotalMemorySize. This attribute does not exist in the older VMs and results in an Exception which is uncaught. That results in the connection being disconnected.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Try connecting JConsole (Java 15) to a Java VM (Version 8). The connection will get closed within 10 seconds. It does not appear to be a function of the OS either end is running on.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Possibly some properties on the screen being absent or NA due to the inability to compute whatever that value is used to compute. Maybe an error dialog or something saying this version of JConsole is not compatible with the older version of Java.
ACTUAL -
Unchecked exception kills the connection.

---------- BEGIN SOURCE ----------
No need. This happens on the raw VM
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Downgrade the Java client or Update the Server VM.

FREQUENCY : always



Comments
There has been no response from the submitter after 14 days. Closing the bug.
25-05-2021

Requested the submitter to see if the bug is fixed in the latest build at https://www.oracle.com/java/technologies/javase-jdk16-downloads.html and provide the feedback.
11-05-2021

Changeset: 14de791d Author: Alex Menkov <amenkov@openjdk.org> Date: 2020-11-20 23:33:11 +0000 URL: https://github.com/openjdk/jdk/commit/14de791d
20-11-2020

jconsole shipped with JDK 14, 15 and 16 loses its connection very quickly with the JVMs below 14. This observation is reproducible in all operating systems. The attribute TotalMemorySize is not available in lower JDKs. Due to this exception the connection may get terminated. If they are incompatible, proper error message should be shown.
05-11-2020