Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-7948

Update ASM version in the Agent

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9.1.0
    • None
    • Mission Control Core
    • None

      Currently the agent is built with ASM 8.0.1, This version is around 2 years old at this point and only supports up to Java 14, It would be nice to upgrade this so the agent can be used on newer JDK versions, as attempting to instrument for example a JDK17 VM leads to an IllegalArgumentException:

      Oct 27, 2022 2:05:14 PM org.openjdk.jmc.agent.Transformer doJFRLogging
      SEVERE: Failed to instrument length()I
      java.lang.IllegalArgumentException: Unsupported class file major version 61
      at org.openjdk.jmc.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
      at org.openjdk.jmc.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
      at org.openjdk.jmc.internal.org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
      at org.openjdk.jmc.agent.Transformer.doJFRLogging(Transformer.java:103)
      at org.openjdk.jmc.agent.Transformer.doTransform(Transformer.java:85)
      at org.openjdk.jmc.agent.Transformer.doTransforms(Transformer.java:75)
      at org.openjdk.jmc.agent.Transformer.transform(Transformer.java:63)
      at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
      at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
      at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
      at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
      at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:169)
      at org.openjdk.jmc.agent.jmx.AgentController.defineEventProbes(AgentController.java:80)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72)
      at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262)
      at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193)
      at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175)
      at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)
      at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)
      at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
      at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
      at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
      at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814)
      at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
      at org.openjdk.jmc.rjmx.internal.MCMBeanServerConnection.invoke(MCMBeanServerConnection.java:258)
      at org.openjdk.jmc.console.agent.AgentJmxHelper.defineEventProbes(AgentJmxHelper.java:140)
      at org.openjdk.jmc.console.agent.editor.AgentEditorUi.applyConfig(AgentEditorUi.java:308)
      at org.openjdk.jmc.console.agent.editor.AgentEditorUi.loadPreset(AgentEditorUi.java:167)
      at org.openjdk.jmc.console.agent.editor.AgentEditorAction.run(AgentEditorAction.java:57)
      at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
      at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:453)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5884)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1522)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5126)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4576)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
      at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
      at org.openjdk.jmc.rcp.application.Application.start(Application.java:64)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

       

      Version 9.4 which supports up to JDK20 was released earlier this month and seems good to update to.

            jmatsuoka Joshua Matsuoka
            jmatsuoka Joshua Matsuoka
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: