SACoreAttachingConnector.attach throws UnmappedAddressException if core was generated for process that use CDS:
> cat Test.java
public class Test {
public static void main(String args[]) {
while (true) {}
}
}
> $JAVA_HOME/bin/java -Xshare:dump
> $JAVA_HOME/bin/java -Xshare:on Test &
> kill -11 $!
> $JAVA_HOME/bin/jstack $JAVA_HOME/bin/java core
Attaching to core core from executable jdk1.8.0/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.0-b70
Deadlock Detection:
sun.jvm.hotspot.debugger.UnmappedAddressException: 800026c08
at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:225)
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCInteger(LinuxDebuggerLocal.java:498)
at sun.jvm.hotspot.debugger.linux.LinuxAddress.getCIntegerAt(LinuxAddress.java:69)
at sun.jvm.hotspot.oops.CIntField.getValue(CIntField.java:49)
at sun.jvm.hotspot.oops.CIntField.getValue(CIntField.java:46)
at sun.jvm.hotspot.utilities.GenericArray.length(GenericArray.java:46)
at sun.jvm.hotspot.oops.InstanceKlass.getAllFieldsCount(InstanceKlass.java:335)
at sun.jvm.hotspot.oops.InstanceKlass.<init>(InstanceKlass.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:58)
at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:104)
at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:211)
at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:251)
at sun.jvm.hotspot.runtime.JavaThread.getThreadObj(JavaThread.java:335)
at sun.jvm.hotspot.runtime.JavaThread.getCurrentParkBlocker(JavaThread.java:387)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106)
Issue could be reproduced with latest 8 and 9 builds. I was able to reproduce it starting from 8 FCS, did not try previous trains yet.
> cat Test.java
public class Test {
public static void main(String args[]) {
while (true) {}
}
}
> $JAVA_HOME/bin/java -Xshare:dump
> $JAVA_HOME/bin/java -Xshare:on Test &
> kill -11 $!
> $JAVA_HOME/bin/jstack $JAVA_HOME/bin/java core
Attaching to core core from executable jdk1.8.0/bin/java, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.0-b70
Deadlock Detection:
sun.jvm.hotspot.debugger.UnmappedAddressException: 800026c08
at sun.jvm.hotspot.debugger.PageCache.checkPage(PageCache.java:208)
at sun.jvm.hotspot.debugger.PageCache.getData(PageCache.java:63)
at sun.jvm.hotspot.debugger.DebuggerBase.readBytes(DebuggerBase.java:225)
at sun.jvm.hotspot.debugger.linux.LinuxDebuggerLocal.readCInteger(LinuxDebuggerLocal.java:498)
at sun.jvm.hotspot.debugger.linux.LinuxAddress.getCIntegerAt(LinuxAddress.java:69)
at sun.jvm.hotspot.oops.CIntField.getValue(CIntField.java:49)
at sun.jvm.hotspot.oops.CIntField.getValue(CIntField.java:46)
at sun.jvm.hotspot.utilities.GenericArray.length(GenericArray.java:46)
at sun.jvm.hotspot.oops.InstanceKlass.getAllFieldsCount(InstanceKlass.java:335)
at sun.jvm.hotspot.oops.InstanceKlass.<init>(InstanceKlass.java:119)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at sun.jvm.hotspot.runtime.VMObjectFactory.newObject(VMObjectFactory.java:58)
at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:104)
at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68)
at sun.jvm.hotspot.oops.Oop.getKlassForOopHandle(Oop.java:211)
at sun.jvm.hotspot.oops.ObjectHeap.newOop(ObjectHeap.java:251)
at sun.jvm.hotspot.runtime.JavaThread.getThreadObj(JavaThread.java:335)
at sun.jvm.hotspot.runtime.JavaThread.getCurrentParkBlocker(JavaThread.java:387)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:82)
at sun.jvm.hotspot.runtime.DeadlockDetector.print(DeadlockDetector.java:39)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:62)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106)
Issue could be reproduced with latest 8 and 9 builds. I was able to reproduce it starting from 8 FCS, did not try previous trains yet.
- duplicates
-
JDK-8200613 SA: jstack throws UnmappedAddressException with a CDS core file
- Resolved