A A A i

billet précédent :: billet suivant

JNI: don't cache jclass

Strange result, I perhaps have missed the point in the documentation. But here is the thing, while multithreaded, even if not in concurrent access, jclass as returned by FindClass are not valid call after call, while jmethodID as returned by GetMethodID are. On Solaris, a new instance created with a wrong jclass leads to this:

Unexpected Signal : 10 occurred at PC=0xfe51e010
Function name=JVM_NewInstance
Library=/opt/WebSphere/AppServer/java/jre/lib/sparc/client/libjvm.so

#
# HotSpot Virtual Machine Error : 10
# Error ID : 4F530E43505002BD 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_05-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid20077.log.
# Please refer to the file for further information.
#

and this (dump trace):

f4480080 libthread.so.1`__sigprocmask+8(ff36bf18, 0, 0, f4481d70, ff37e000, 0)
f4480120 libthread.so.1`_sigon+0xd0(f4481d70, ff385938, 6, f44801e4, f4481d70, 6)
f4480180 libthread.so.1`_thrp_kill+0xf8(0, 11, 6, ff37e000, 11, ff2bc488)
f44801e8 libc.so.1`raise+0x40(6, 0, 0, ffffffff, ff2bc3f4, 4)
f4480248 libc.so.1`abort+0x100(ff2b801c, f4480338, 0, fffffff8, 4, f4480359)
f44802d8 libjvm.so`__1cCosFabort6Fl_v_+0xb8(1, fe742000, 1, f44803b8, 0, fe51e010)
f4480358 libjvm.so`__1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_+0x254(ff2bc2e4, fe77efe8, \
                                                                  fe754d58, fe704a70, fe742000, f44803d8)
f4480c08 libjvm.so`JVM_handle_solaris_signal+0x894(0, 2469e8, f4480e60, fe742000, a, f4481118)
f4480cc8 libthread.so.1`__sighndlr+0xc(a, f4481118, f4480e60, fe6865fc, f4481e14, f4481e04)
f4480d28 libthread.so.1`sigacthandler+0x708(a, f4481d70, 0, 0, 0, ff37e000)
f4481198 libjvm.so`__1cMalloc_object6FpnH_jclass_pnGThread__pnPinstanceOopDesc__+0x7c(1, 2469e8, \
                                                                    f44819b8, ff284bb4, f4480d8c, 0)
f4481200 libjvm.so`jni_NewObject+0x78(246a74, 249528, fe742000, 2469e8, fafa2998, fe742000)
f4481298 libmylib.so`myCFunction+0x134(246a74, f4481558, f4481390, f4481380, fffffff8, f4481558)
f4481310 libmylib.so`Java_com_my_class_myMethod+0x5a4(246a74, f44817b4, f44817b0, f44817ac, f44817a8, f44817a4)

(Cyberpunk, 2003/07/15 05:41) lien permanent

Les commentaires pour ce billet sont fermés.


qui est

nom : Damien Bonvillain
courriel : kame à cinemasie.com
bloggercode:
B9 D+ T+ K S F I- O X+ E- L- C-- Y1 R+ W- P+ M5 N-- N+
un peu plus : Google Whoring tortue

Messagerie instantanée

    les koms

    m'enfin

    Quant à mes invectives imaginaires, je vous laisse chercher un endroit adéquat pour les ranger. Elles craignent la lumière, si vous voulez une piste.
    Lien associé
    Eolas - « Aimez moi, c'est un ordre. »

    les bons vieux


    archives

    « juillet 2003 »
    lunmarmerjeuvensamdim
    123456
    78910111213
    14151617181920
    21222324252627
    28293031

    XML RSS 2.0 XML RSS 2.0 commentaires A A A i

    liens

    allégeance

    Blog sans chat

    colophon

    Propulsé par pointClairMerci à la caféineDevelopment with EmacsBadges from GTMcKnightFreeListed on BlogSharesGeoURL