JDK-8365722 : [lworld] SA tests fail with Array Klass rework
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-08-18
  • Updated: 2025-10-27
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
sun.jvm.hotspot.runtime.ConstructionException: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructor(java.lang.Class[])" because "clazz" is null
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:67)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:106)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:80)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.MetadataField.getValue(MetadataField.java:43)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.MetadataField.getValue(MetadataField.java:40)
at jdk.hotspot.agent/sun.jvm.hotspot.oops.Klass.getNextLinkKlass(Klass.java:124)
at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderData.find(ClassLoaderData.java:86)
at jdk.hotspot.agent/sun.jvm.hotspot.classfile.ClassLoaderDataGraph.find(ClassLoaderDataGraph.java:61)
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.getAbstractOwnableSynchronizerKlass(SystemDictionary.java:115)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.run(JStack.java:67)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:278)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.start(Tool.java:241)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.Tool.execute(Tool.java:134)
at jdk.hotspot.agent/sun.jvm.hotspot.tools.JStack.runWithArgs(JStack.java:90)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runJSTACK(SALauncher.java:306)
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:507)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Class.getConstructor(java.lang.Class[])" because "clazz" is null
at jdk.hotspot.agent/sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:55)
... 19 more
Comments
And the new test: serviceability/sa/TestJhsdbJstackWithVirtualThread.java
27-10-2025

Ok, so these are all WIP changes. Vahalla support for SA is not a current priority for the serviceability team ATM, and no work is planned for the time being.
19-08-2025

[~cjplummer] You need this patch: https://github.com/openjdk/valhalla/pull/1452 that Fred and Tobias are working on, and a CDS patch (add these commits) https://github.com/fparain/valhalla/pull/4/commits In Fred's rework, there's a FlatArrayKlass and a RefArrayKlass. There's still an ObjArrayKlass which is a base class of both of these. But the ObjArrayKlass is the holder of the mirror and the mirror points at that. I think the SA needs to write a RefArrayKlass, is my guess anyway. It may already have FlatArrayKlass but that has to be inherited from ObjArrayKlass. element_klass field moved back to ArrayKlass.
19-08-2025

[~coleenp] You say the tests fail with "Array Klass rework". Can you clarify if this is a recent change, and possibly include a reference to any recent commits that introduced the issue?
19-08-2025

Affected tests: serviceability/sa/CDSJMapClstats.java serviceability/sa/ClhsdbClasses.java serviceability/sa/sadebugd/DisableRegistryTest.java serviceability/sa/ClhsdbDumpheap.java serviceability/sa/sadebugd/ClhsdbTestConnectArgument.java serviceability/sa/sadebugd/DebugdConnectTest.java serviceability/sa/ClhsdbJhisto.java serviceability/sa/ClhsdbJstack.java#id1 serviceability/sa/ClhsdbJstackWithConcurrentLock.java serviceability/sa/ClhsdbJstackXcompStress.java serviceability/sa/ClhsdbPstack.java#process serviceability/sa/ClhsdbPstack.java#core serviceability/sa/ClhsdbScanOops.java#id0 serviceability/sa/ClhsdbScanOops.java#id1 serviceability/sa/DeadlockDetectionTest.java serviceability/sa/ClhsdbJstack.java#id0 serviceability/sa/TestInstanceKlassSize.java serviceability/sa/TestSysProps.java serviceability/sa/sadebugd/ClhsdbAttachToDebugServer.java
18-08-2025