want your help

Yongqiang Yang xiaoqiangnk at gmail.com
Wed Dec 8 17:56:09 PST 2010


Hi Gary,


That you for your help very much.

I have looked as you suggested.  There is no safepoint rom return at
GetObjectClass to calling CallVoidMethod.

This bug  appears in Finalizer thread every time. Thus, I think maybe there
is a bug in finalizer.  When I use -Xcomp option, finalize function is not
called.  When I
use mixed or interpretered jvm, finalize is called.  I don't know what
happens in -Xcomp mode.  I  find that finalizer  is registered using
-XX:+TraceRegisterdFinalizer.





On Wed, Dec 8, 2010 at 5:49 PM, Gary Benson <gbenson at redhat.com> wrote:

> Hi Yongqiang,
>
> Yongqiang Yang wrote:
> > Hi everyone,
> >
> > I am porting hotspot to MIPS.  I meet a bug as follows.
> >
> > In function Java_java_lang_ref_Finalizer_invokeFinalizeMethod,
> > value of jobject is right when call GetObjectClass and also right
> > before return from GetObjectClass . However,  it is wrong when
> > calling CallVoidMethod.   For example, It is changed from 0x3e0885d0
> > to 0x423ce794.
> > Thus, it results in an assert failure below.
> > ----------------------------------------------------------------------
> >   assert(SharedSkipVerify || obj->is_oop()) failed: sanity check
> > ----------------------------------------------------------------------
> >
>
> > I want to know who will change this value from return at GetObjectClass
> > to calling CallVoidMethod.  During this time, GC don't run.
>
> >
> > Could anyone have an idea about this?
>
> Look at the source code to jni_GetMethodID and jni_CallVoidMethod,
> in hotspot/src/share/vm/prims/jni.cpp.  Notice the JNI_ENTRY and
> JNI_END surrounding them?  Look at the source code for JNI_ENTRY,
> in hotspot/src/share/vm/runtime/interfaceSupport.hpp.  Do you see
> the ThreadInVMfromNative?  That object has a constructor and a
> destructor, both of which contain thread state transitions.
> Safepoints can occur during those transitions, and oops can change
> at any safepoint regardless of whether the GC runs.  You could try
> running with -XX:+TraceSafepoint or something like that to see if
> one is occuring.
>
> Cheers,
> Gary
>
> --
> http://gbenson.net/
>



-- 
Best Wishes
Yongqiang Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20101209/31d47d94/attachment.html 


More information about the hotspot-dev mailing list