Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jdmpview from Java 22 does not work for system core files from Java 17. #19934

Closed
manqingl opened this issue Jul 30, 2024 · 10 comments · Fixed by #20097
Closed

Jdmpview from Java 22 does not work for system core files from Java 17. #19934

manqingl opened this issue Jul 30, 2024 · 10 comments · Fixed by #20097

Comments

@manqingl
Copy link

It looks to me some generated classes were deleted from openj9.dtfj.jmod. This breaks the backward compatibility of Jdmpview

/common/public/tools/ddr/x/jdk-20.1+8/bin/java -Xshareclasses:none -version
openjdk version "22.0.1-beta" 2024-04-16
IBM Semeru Runtime Open Edition 22.0.1+8-202406280047 (build 22.0.1-beta+8-202406280047)
Eclipse OpenJ9 VM 22.0.1+8-202406280047 (build master-22eaa4d435, JRE 22 Linux amd64-64-Bit Compressed References 20240628_193 (JIT enabled, AOT enabled)
OpenJ9 - 22eaa4d
OMR - 47a9d248d
JCL - e29be76fa based on jdk-22.0.1+8)

/common/public/tools/ddr/x/jdk-22.0.1+8/bin/jdmpview -J-Xshareclasses:none -core core.20240726.063619.30790.0001.dmp
DTFJView version 4.29.5, using DTFJ version 1.12.29003
Loading image from DTFJ...

Warning: native libraries are not available for core.20240726.063619.30790.0001.dmp
For a list of commands, type "help"; for how to use "help", type "help help"
Available contexts (* = currently selected context) :

Source : file:///ecurep/sf/TS016/603/TS016603209/2024-07-26/core.20240726.063619.30790.0001.dmp.zip_unpack/scratch/core/core.20240726.063619.30790.0001.dmp
*0 : PID: 56618 : JRE 17 Linux amd64-64 (build 17.0.9+9) IBM Semeru Runtime Open Edition

!stackslots 0x0096b300
Error executing DDR command !stackslots 0x0096b300 : null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:586)
at openj9.dtfjview/com.ibm.jvm.dtfjview.CombinedContext.executeDDRInteractiveCommand(CombinedContext.java:258)
at openj9.dtfjview/com.ibm.jvm.dtfjview.CombinedContext.execute(CombinedContext.java:169)
at openj9.dtfjview/com.ibm.jvm.dtfjview.Session.execute(Session.java:813)
at openj9.dtfjview/com.ibm.jvm.dtfjview.Session.execute(Session.java:767)
at openj9.dtfjview/com.ibm.jvm.dtfjview.tools.ToolsRegistry.executeJdmpviewCommand(ToolsRegistry.java:183)
at openj9.dtfjview/com.ibm.jvm.dtfjview.tools.ToolsRegistry.execute(ToolsRegistry.java:107)
at openj9.dtfjview/com.ibm.jvm.dtfjview.tools.ToolsRegistry.execute(ToolsRegistry.java:88)
at openj9.dtfjview/com.ibm.jvm.dtfjview.tools.ToolsRegistry.recordAndExecute(ToolsRegistry.java:72)
at openj9.dtfjview/com.ibm.jvm.dtfjview.Session.runInteractive(Session.java:741)
at openj9.dtfjview/com.ibm.jvm.dtfjview.Session.run(Session.java:665)
at openj9.dtfjview/com.ibm.jvm.dtfjview.DTFJView.launch(DTFJView.java:52)
at openj9.dtfjview/com.ibm.jvm.dtfjview.DTFJView.main(DTFJView.java:46)
Caused by: java.lang.NoClassDefFoundError: com.ibm.j9ddr.vm29.pointer.generated.J9JITGPRSpillAreaPointer
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker$1.allAlgorithms(StackWalker.java:131)
at com.ibm.j9ddr.vm29.j9.AlgorithmPicker.pickAlgorithm(AlgorithmPicker.java:43)
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker.getImpl(StackWalker.java:138)
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker.walkStackFrames(StackWalker.java:99)
at com.ibm.j9ddr.vm29.tools.ddrinteractive.commands.StackWalkCommand.run(StackWalkCommand.java:144)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.Context.tryCommand(Context.java:229)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.Context.execute(Context.java:202)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.DDRInteractive.execute(DDRInteractive.java:356)
at openj9.dtfj/com.ibm.j9ddr.command.CommandReader.processLine(CommandReader.java:78)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.DDRInteractive.processLine(DDRInteractive.java:331)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 13 more
Caused by: java.lang.ClassNotFoundException: J9JITGPRSpillAreaPointer is not in core file
at openj9.dtfj/com.ibm.j9ddr.StructureReader.getPointerClassBytes(StructureReader.java:1127)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.getPointerClass(J9DDRClassLoader.java:227)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.findClass(J9DDRClassLoader.java:129)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.loadClass(J9DDRClassLoader.java:206)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1102)
... 24 more

@manqingl
Copy link
Author

@pshipton @keithc-ca FYI

@keithc-ca
Copy link
Contributor

I can confirm that J9JITGPRSpillArea is not in j9ddr.dat in 17.0.9+9.
However, I don't see any references to that class either. Were you using any DDR plugins?

@manqingl
Copy link
Author

I used the jdmpview tool in the !stackslots command (!stackslots 0x0096b300). The text in the top of this page has the details. @keithc-ca

@keithc-ca
Copy link
Contributor

So no DDR plugins?

@manqingl
Copy link
Author

No DDR plugins (assuming !stackslots is counted as a DDR command, but not as a DDR plugin).

@gacholio
Copy link
Contributor

gacholio commented Jul 30, 2024

J9JITGPRSpillArea was added here: af13691

I believe I added the structure (Jack committed it along with more changes). Did I miss something? There's no direct reference to the structure in the DDR code.

@keithc-ca
Copy link
Contributor

There is an inlined instance in J9VMContinuation which is referenced in DDR code, but as far as I can tell, only in support of !continuationstack and !continuationstackslots which have guards that the core is from jdk19 or newer (which should not apply to the situation discussed here).

@manqingl
Copy link
Author

Looks like the exception happens when a new instance of StackWalker_29_V0() is created at StackWalker.java:131 :

java.lang.ClassNotFoundException: J9JITGPRSpillAreaPointer is not in core file
at openj9.dtfj/com.ibm.j9ddr.StructureReader.getPointerClassBytes(StructureReader.java:1133)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.getPointerClass(J9DDRClassLoader.java:229)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.findClass(J9DDRClassLoader.java:129)
at openj9.dtfj/com.ibm.j9ddr.J9DDRClassLoader.loadClass(J9DDRClassLoader.java:206)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:1075)
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker$1.allAlgorithms(StackWalker.java:131)
at com.ibm.j9ddr.vm29.j9.AlgorithmPicker.pickAlgorithm(AlgorithmPicker.java:43)
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker.getImpl(StackWalker.java:138)
at com.ibm.j9ddr.vm29.j9.stackwalker.StackWalker.walkStackFrames(StackWalker.java:99)
at com.ibm.j9ddr.vm29.tools.ddrinteractive.commands.StackWalkCommand.run(StackWalkCommand.java:144)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.Context.tryCommand(Context.java:229)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.Context.execute(Context.java:202)
at openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.DDRInteractive.execute(DDRInteractive.java:356)

@keithc-ca
Copy link
Contributor

I think this is a consequence of #18014. I'm hoping that this can be remedied by declaring a fictitious (and unused) field of J9JITGPRSpillArea which will allow that structure to be referenced. If I put a test build together, could you test it on a troublesome system dump, @manqingl? If so, which platform works for you?

@manqingl
Copy link
Author

I can test in a Linux or AIX platform. @keithc-ca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants