RFR: 8003348: SA can not read core file on OS X
yumin.qi at oracle.com
Fri Jan 18 09:41:57 PST 2013
I cloned a fresh workspace and applied the patch, it runs OK, but it
must have same build with libjvm.dylib since it will fail on missing
fields when reading type library.
That is, build hotspot to get libjvm.dylib, libsaproc.dylib and
sa-jdi.jar. Grab a binary from promoted/latest and replace existing
corresponding files with those three, run your test case to generated a
core file. Reading core file with SA should not have problem. It will
have problem reading a core generated not by same libjvm.dylib since the
type library mismatch.
I am thinking about write a tool to dump vmStructs data from
libjvm.dylib (so) and symbols (with offsets), this way give an
alternative way to workaround if the core file and libjvm.so mismatch.
Remember tom had some tool but lost trace of it. Or this tool be a part
of hotspot. When jvm crashed, such information will be dumped into a
file. In SA, if set, for example, ALT_TYPEFILE (or other name), the
type info and symbols will be read from this file instead of reading
from core file and libjvm.so.
That is, customer send in core and this vmStruct dump file, that is all
we need to read a core file (this should be future work, not in this bug).
I will apply the diff to BugSpotAgent.java too.
On 1/18/2013 8:19 AM, Yumin Qi wrote:
> This should be essential change in the fix, let me check if I missed
> file in the list.
> On 1/18/2013 3:58 AM, Staffan Larsen wrote:
>> Thanks for doing this Yumin!
>> I tried to apply you patch and run it, but I can't get SA to open a
>> core file. You can see the exception I get below. Is there some kind
>> of setup I need to do? This is against a jvmg build of Hotspot.
>> I also noticed that you forgot to update BugSpotAgent.java with the
>> same changes as in HotspotAgent.java. This makes the jstack tool fail.
>> I will look at the changes more closely.
>> Opening core file, please wait...
>> Unable to open core file
>> Doesn't appear to be a HotSpot VM (could not find symbol
>> "gHotSpotVMTypes" in
>> remote process)
>> sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a
>> HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)
>> at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:385)
>> at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:287)
>> at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:146)
>> at sun.jvm.hotspot.CLHSDB.attachDebugger(CLHSDB.java:188)
>> at sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:55)
>> at sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:35)
>> hsdb> Input stream closed.
>> On 17 jan 2013, at 22:23, Yumin Qi<yumin.qi at oracle.com> wrote:
>>> Please review for the changes for SA to read core file on Mac OS
>>> X, this is feature is not implemented on previous releases.
>>> This change made for SA to work on core file on Darwin, but
>>> still some function not fixed, such as 'pstack'. This is intended to
>>> integrate into 8.
>>> Please take some time since the code change is a little bigger.
>>> Thanks very much
More information about the hotspot-runtime-dev