Summary: | java/openjdk7 jinfo and jmap do not work | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Jov <amutu> |
Component: | Individual Port(s) | Assignee: | Greg Lewis <glewis> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | ari, dms, girgen, java, jkim, michael.osipov, swills, w.schwarzenfeld |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | amd64 | ||
OS: | Any |
Description
Jov
2014-09-09 03:26:40 UTC
notify maintainer Assign to the actual maintainer. Add java@FreeBSD.org to CC list. Both jmap and jinfo uses serviceability agent, see hotspot/agent for the sources (In reply to Dmitry Samersoff from comment #3) > Both jmap and jinfo uses serviceability agent, see hotspot/agent for the > sources Yes, I fixed the problems for java/openjdk6 long ago. http://svnweb.freebsd.org/changeset/ports/268830 I ported the fixes to java/openjdk8, too. Unfortunately, I never found time to fix them for java/openjdk7. (In reply to Jung-uk Kim from comment #4) > I ported the fixes to java/openjdk8, too. Actually, now I am not sure about this any more. I'll test it later. It seems we haven't merged this changeset for BSD: http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot/rev/c7b481c7e5d9 (In reply to Jung-uk Kim from comment #5) > (In reply to Jung-uk Kim from comment #4) > > I ported the fixes to java/openjdk8, too. > > Actually, now I am not sure about this any more. I'll test it later. I just tested java/openjdk8. It seems it does not have this problem. (In reply to Jung-uk Kim from comment #6) > It seems we haven't merged this changeset for BSD: > > http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot/rev/c7b481c7e5d9 I guess I was wrong. It still seems to fail with this change merged to a BSD version. So does jmap work for OpenJDK8? (In reply to Palle Girgensohn from comment #9) not work for openjdk8: Attaching to process ID 51833, please wait... Exception in thread "main" java.lang.reflect.InvocationTargetException 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:498) at sun.tools.jmap.JMap.runTool(JMap.java:201) at sun.tools.jmap.JMap.main(JMap.java:130) Caused by: java.lang.InternalError: void* type hasn't been seen when parsing int* at sun.jvm.hotspot.HotSpotTypeDataBase.recursiveCreateBasicPointerType(HotSpotTypeDataBase.java:721) at sun.jvm.hotspot.HotSpotTypeDataBase.lookupType(HotSpotTypeDataBase.java:134) at sun.jvm.hotspot.HotSpotTypeDataBase.lookupOrCreateClass(HotSpotTypeDataBase.java:631) at sun.jvm.hotspot.HotSpotTypeDataBase.createType(HotSpotTypeDataBase.java:751) at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:195) at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:89) at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:400) at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:306) at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:141) at sun.jvm.hotspot.tools.Tool.start(Tool.java:185) at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118) at sun.jvm.hotspot.tools.PMap.main(PMap.java:72) ... 6 more Any news here? I can confirm this for 1.7:
> $ sudo JAVA_VERSION=1.7 jmap -heap 61192
> Attaching to process ID 61192, please wait...
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at sun.tools.jmap.JMap.runTool(JMap.java:197)
> at sun.tools.jmap.JMap.main(JMap.java:128)
> Caused by: sun.jvm.hotspot.debugger.UnalignedAddressException: 9cef4867
> at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal$1.checkAlignment(BsdDebuggerLocal.java:183)
> at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readCInteger(BsdDebuggerLocal.java:487)
> at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBase.java:454)
> at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readAddress(BsdDebuggerLocal.java:430)
> at sun.jvm.hotspot.debugger.bsd.BsdAddress.getAddressAt(BsdAddress.java:74)
> at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBase.java:154)
> at sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.java:85)
> at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:573)
> at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:494)
> at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:332)
> at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
> at sun.jvm.hotspot.tools.HeapSummary.main(HeapSummary.java:40)
> ... 6 more
OpenJDK 8 works like a charm.
For me, testing on openjdk8 on CURRENT, jmap works fine, but jinfo says: Java System Properties: Exception in thread "main" java.lang.reflect.InvocationTargetException 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:498) at sun.tools.jinfo.JInfo.runTool(JInfo.java:108) at sun.tools.jinfo.JInfo.main(JInfo.java:76) Caused by: java.lang.InternalError: Metadata does not appear to be polymorphic at sun.jvm.hotspot.types.basic.BasicTypeDataBase.findDynamicTypeForAddress(BasicTypeDataBase.java:278) at sun.jvm.hotspot.runtime.VirtualBaseConstructor.instantiateWrapperFor(VirtualBaseConstructor.java:102) at sun.jvm.hotspot.oops.Metadata.instantiateWrapperFor(Metadata.java:68) at sun.jvm.hotspot.memory.SystemDictionary.getSystemKlass(SystemDictionary.java:127) at sun.jvm.hotspot.runtime.VM.readSystemProperties(VM.java:879) at sun.jvm.hotspot.runtime.VM.getSystemProperties(VM.java:873) at sun.jvm.hotspot.tools.SysPropsDumper.run(SysPropsDumper.java:44) at sun.jvm.hotspot.tools.JInfo$1.run(JInfo.java:79) at sun.jvm.hotspot.tools.JInfo.run(JInfo.java:94) 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.JInfo.main(JInfo.java:138) ... 6 more openjdk7 is now deprecated |