Date: Mon, 16 Apr 2012 16:08:18 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: freebsd-java@freebsd.org Cc: Andrew <andrew@flarn.com> Subject: Re: OpenJDK7 jmap UnalignedAddressException Message-ID: <201204161608.21463.jkim@FreeBSD.org> In-Reply-To: <20120416162239.GA59319@misty.eyesbeyond.com> References: <CA%2BuL9eYD7ZwP=L%2BA9FR%2B_-jBbdNr2yk66X3BqkUKnY-z-6M-Ow@mail.gmail.com> <20120416162239.GA59319@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 16 April 2012 12:22 pm, Greg Lewis wrote: > G'day Andrew, > > On Sun, Apr 15, 2012 at 03:17:42PM +0100, Andrew wrote: > > I'm running a 9-STABLE on AMD64 machine with the port > > java/openjdk7 installed and when I execute jmap against a running > > java process of the same JDK running under the same (non-root) > > user or running jmap as root I get the following exception: > > > > Attaching to process ID 97337, please wait... > > Exception in thread "main" > > java.lang.reflect.InvocationTargetException at > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI > >mpl.java:57) at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA > >ccessorImpl.java:43) at > > java.lang.reflect.Method.invoke(Method.java:601) 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: > > 746f705b75af4867 at > > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal$1.checkAlignment(Bs > >dDebuggerLocal.java:181) at > > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readCInteger(BsdDeb > >uggerLocal.java:478) at > > sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(DebuggerBa > >se.java:454) at > > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readAddress(BsdDebu > >ggerLocal.java:423) at > > sun.jvm.hotspot.debugger.bsd.BsdAddress.getAddressAt(BsdAddress.j > >ava:74) at > > sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTypeDataBa > >se.java:154) at > > sun.jvm.hotspot.HotSpotTypeDataBase.<init>(HotSpotTypeDataBase.ja > >va:85) at > > sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:57 > >2) at > > sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:493) at > > sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:331 > >) at sun.jvm.hotspot.tools.Tool.start(Tool.java:163) at > > sun.jvm.hotspot.tools.PMap.main(PMap.java:67) ... 6 more > > > > uname: FreeBSD 9.0-STABLE #0: Thu Apr 12 10:59:45 BST 2012 > > Java: > > /usr/local/openjdk7/bin/java -version > > openjdk version "1.7.0_02" > > OpenJDK Runtime Environment (build 1.7.0_02-b13) > > OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode) > > > > Has anyone else seen this error? > > At some point during the OpenJDK 7 lifespan this and other related > utilities seem to have stopped working. I fixed (similar) problems on OpenJDK6 long ago. Please see openjdk6 b21 and b21_1 patchsets and commit log. > I haven't really sat down and looked into what broke yet. Might be > interesting to see if i386 gets the same error as amd64. I guess you are thinking thread pointer <-> int conversions are the culprits. If so, you need FreeBSD-specific hacks as I did for OpenJDK6. Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204161608.21463.jkim>