Geir, all, I did reserched this failure some time ago. The same failure was observed on gc.Finalizers. Here is what I've found.
Now what is happening: 1) FinalizerThread is being run 2) java/lang/Object.notify()V is being compiled 3) java/lang/InternalError is being resolved (and loaded) for java/lang/Object 4) GC happens while creating instance of java/lang/Class for java/lang/InternalError 5) vm_hint_finalize happens 6) java/lang/ref/ReferenceQueue.enqueue is being called 7) java/lang/Object.notify()V is being compiled 8) java/lang/InternalError is being resolved (and loaded) for java/lang/Object 9) ClassCircularityError occurs for java/lang/InternalError 10) VM returns to step (3) 11) Assertion happens in SuccessLoadingClass for java/lang/InternalError as LoadingClass instance for this class was removed on step (9) It can be tried to fix it in class loading, but I can imagine only one generic solution for this problem: do not run Java while compiling. Which more specifically means no Java heap allocations as our finalization subsystem is partially written in Java. Whole native stack on Windows look the following way: harmonyvm.dll!ClassLoader::StartLoadingClass(Global_Env * env=0x008635d0, const String * className=0x0114360c) Line 785 C++ harmonyvm.dll!BootstrapClassLoader::LoadClass(Global_Env * env=0x008635d0, const String * className=0x0114360c) Line 1591 + 0x13 C++ harmonyvm.dll!ClassLoader::LoadVerifyAndPrepareClass(Global_Env * env=0x008635d0, const String * name=0x0114360c) Line 383 + 0x15 C++ harmonyvm.dll!_resolve_class(Global_Env * env=0x008635d0, Class * clss=0x0119fcc8, unsigned int cp_index=20) Line 156 + 0x13 C++ harmonyvm.dll!_resolve_class_new(Global_Env * env=0x008635d0, Class * clss=0x0119fcc8, unsigned int cp_index=20) Line 220 + 0x11 C++ harmonyvm.dll!resolve_class_new(void * h=0x0335cef4, Class * c=0x0119fcc8, unsigned int index=20) Line 900 + 0x1a C++ harmonyvm.dll!vm_resolve_class_new(void * h=0x0335cef4, Class * c=0x0119fcc8, unsigned int index=20) Line 898 + 0x11 C++ jitrino.dll!Jitrino::Jet::Compiler::handle_ik_obj(const Jitrino::Jet::JInst & jinst={...}) Line 475 + 0x15 C++ jitrino.dll!Jitrino::Jet::Compiler::handle_inst() Line 67 C++ jitrino.dll!Jitrino::Jet::Compiler::comp_gen_insts(unsigned int pc=0, unsigned int parentPC=59, unsigned int jsr_lead=4294967295) Line 984 C++ jitrino.dll!Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int pc=23) Line 802 + 0xe C++ jitrino.dll!Jitrino::Jet::Compiler::compile(void * ch=0x0335cef4, Method * method=0x023dedd0, const OpenMethodExecutionParams & params={...}) Line 376 C++ jitrino.dll!Jitrino::Jet::compile_with_params(void * jit_handle=0x011b7798, void * ch=0x0335cef4, Method * method=0x023dedd0, OpenMethodExecutionParams params={...}) Line 519 + 0x2cC++ jitrino.dll!JIT_compile_method_with_params(void * jit=0x011b7798, void * compilation=0x0335cef4, Method * method_handle=0x023dedd0, OpenMethodExecutionParams compilation_params={...}) Line 277 + 0x1b C++ harmonyvm.dll!Dll_JIT::compile_method_with_params(void * compilation=0x0335cef4, Method * method=0x023dedd0, OpenMethodExecutionParams flags={...}) Line 85 + 0x18 C++ harmonyvm.dll!compile_do_compilation_jit(Method * method=0x023dedd0, JIT * jit=0x011b7798) Line 706 + 0x19 C++ harmonyvm.dll!vm_compile_method(void * jit=0x011b7798, Method * method=0x023dedd0) Line 2534 + 0xd C++ em.dll!DrlEMImpl::compileMethod(Method * mh=0x023dedd0) Line 519 + 0x13 C++ em.dll!CompileMethod(Method * method_handle=0x023dedd0) Line 48 + 0x19 C++ harmonyvm.dll!compile_do_compilation(Method * method=0x023dedd0, JIT_Flags flags={...}) Line 783 + 0x15 C++ harmonyvm.dll!compile_jit_a_method(Method * method=0x023dedd0) Line 831 + 0xd C++ 012c00dd() harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0335d3bc, int sz=1, void * f=0x012c84b0) Line 76 C++ harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x0254e4b0, jvalue * return_value=0x0335d594, jvalue * args=0x0335d5a4) Line 222 + 0x14 C++ em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x0254e4b0, jvalue * return_value=0x0335d594, jvalue * args=0x0335d5a4) Line 488 + 0x16 C++ em.dll!ExecuteMethod(_jmethodID * meth=0x0254e4b0, jvalue * return_value=0x0335d594, jvalue * args=0x0335d5a4) Line 42 + 0x21 C++ harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x0254e4b0, jvalue * result=0x0335d594, jvalue * args=0x0335d5a4) Line 57 + 0x1c C++ harmonyvm.dll!References_To_Enqueue::enqueue_references() Line 440 + 0x14 C++ harmonyvm.dll!vm_enqueue_references() Line 514 C++ harmonyvm.dll!vm_hint_finalize() Line 190 C++ gc.dll!gc_alloc(unsigned int in_size=32, unsigned int ah=20709472, void * thread_pointer=0x0102d2ac) Line 198 + 0x8 C++ harmonyvm.dll!ClassLoader::AllocateAndReportInstance(const Global_Env * env=0x008635d0, Class * clss=0x02b6a428) Line 1111 + 0x22 C++ harmonyvm.dll!ClassLoader::InitClassFields(const Global_Env * env=0x008635d0, Class * clss=0x02b6a428, const String * name=0x0114360c) Line 1161 + 0x10 C++ harmonyvm.dll!ClassLoader::NewClass(const Global_Env * env=0x008635d0, const String * name=0x0114360c) Line 234 C++ harmonyvm.dll!ClassLoader::DefineClass(Global_Env * env=0x008635d0, const char * class_name=0x01143618, unsigned char * bytecode=0x0335d8f0, unsigned int offset=0, unsigned int length=512, const String * * res_name=0x00000000) Line 288 + 0x10 C++ harmonyvm.dll!BootstrapClassLoader::LoadFromJarFile(JarFile * jar_file=0x0119f7e0, const char * class_name_in_jar=0x0335db20, const String * class_name=0x0114360c, bool * not_found=0x0335dc0f) Line 1919 + 0x22 C++ harmonyvm.dll!BootstrapClassLoader::LoadFromFile(const String * class_name=0x0114360c) Line 1823 + 0x24 C++ harmonyvm.dll!BootstrapClassLoader::LoadClass(Global_Env * env=0x008635d0, const String * className=0x0114360c) Line 1612 + 0xc C++ harmonyvm.dll!ClassLoader::LoadVerifyAndPrepareClass(Global_Env * env=0x008635d0, const String * name=0x0114360c) Line 383 + 0x15 C++ harmonyvm.dll!_resolve_class(Global_Env * env=0x008635d0, Class * clss=0x0119fcc8, unsigned int cp_index=20) Line 156 + 0x13 C++ harmonyvm.dll!_resolve_class_new(Global_Env * env=0x008635d0, Class * clss=0x0119fcc8, unsigned int cp_index=20) Line 220 + 0x11 C++ harmonyvm.dll!resolve_class_new(void * h=0x0335f854, Class * c=0x0119fcc8, unsigned int index=20) Line 900 + 0x1a C++ harmonyvm.dll!vm_resolve_class_new(void * h=0x0335f854, Class * c=0x0119fcc8, unsigned int index=20) Line 898 + 0x11 C++ jitrino.dll!Jitrino::Jet::Compiler::handle_ik_obj(const Jitrino::Jet::JInst & jinst={...}) Line 475 + 0x15 C++ jitrino.dll!Jitrino::Jet::Compiler::handle_inst() Line 67 C++ jitrino.dll!Jitrino::Jet::Compiler::comp_gen_insts(unsigned int pc=0, unsigned int parentPC=59, unsigned int jsr_lead=4294967295) Line 984 C++ jitrino.dll!Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int pc=23) Line 802 + 0xe C++ jitrino.dll!Jitrino::Jet::Compiler::compile(void * ch=0x0335f854, Method * method=0x023dedd0, const OpenMethodExecutionParams & params={...}) Line 376 C++ jitrino.dll!Jitrino::Jet::compile_with_params(void * jit_handle=0x011b7798, void * ch=0x0335f854, Method * method=0x023dedd0, OpenMethodExecutionParams params={...}) Line 519 + 0x2c C++ jitrino.dll!JIT_compile_method_with_params(void * jit=0x011b7798, void * compilation=0x0335f854, Method * method_handle=0x023dedd0, OpenMethodExecutionParams compilation_params={...}) Line 277 + 0x1b C++ harmonyvm.dll!Dll_JIT::compile_method_with_params(void * compilation=0x0335f854, Method * method=0x023dedd0, OpenMethodExecutionParams flags={...}) Line 85 + 0x18 C++ harmonyvm.dll!compile_do_compilation_jit(Method * method=0x023dedd0, JIT * jit=0x011b7798) Line 706 + 0x19 C++ harmonyvm.dll!vm_compile_method(void * jit=0x011b7798, Method * method=0x023dedd0) Line 2534 + 0xd C++ em.dll!DrlEMImpl::compileMethod(Method * mh=0x023dedd0) Line 519 + 0x13 C++ em.dll!CompileMethod(Method * method_handle=0x023dedd0) Line 48 + 0x19 C++ harmonyvm.dll!compile_do_compilation(Method * method=0x023dedd0, JIT_Flags flags={...}) Line 783 + 0x15 C++ harmonyvm.dll!compile_jit_a_method(Method * method=0x023dedd0) Line 831 + 0xd C++ 012c00dd() harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0335fd58, int sz=1, void * f=0x012c2490) Line 76 C++ harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x02466080, jvalue * return_value=0x00000000, jvalue * args=0x0335feac) Line 199 C++ em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x02466080, jvalue * return_value=0x00000000, jvalue * args=0x0335feac) Line 488 + 0x16 C++ em.dll!ExecuteMethod(_jmethodID * meth=0x02466080, jvalue * return_value=0x00000000, jvalue * args=0x0335feac) Line 42 + 0x21 C++ harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x02466080, jvalue * result=0x00000000, jvalue * args=0x0335feac) Line 57 + 0x1c C++ harmonyvm.dll!call_method_no_ref_result(JNIEnv_External * env=0x00862fd8, _jobject * obj=0x02ab1978, _jmethodID * methodID=0x02466080, jvalue * args=0x00000000, jvalue * result=0x00000000, int non_virtual=0) Line 164 + 0x11 C++ harmonyvm.dll!CallVoidMethodA(JNIEnv_External * env=0x00862fd8, _jobject * obj=0x02ab1978, _jmethodID * methodID=0x02466080, jvalue * args=0x00000000) Line 199 + 0x19 C++ harmonyvm.dll!wrapper_proc(void * arg=0x02ab1a60) Line 98 + 0x27 C hythr.dll!thread_start_proc(apr_thread_t * thd=0x0041ffb0, void * p_args=0x0041ff08) Line 704 + 0xf C hythr.dll!dummy_worker(void * opaque=0x0041ffb0) Line 79 + 0x13 C hythr.dll!_threadstartex(void * ptd=0x00352850) Line 241 + 0xd C kernel32.dll!7c80b50b() kernel32.dll!7c8399f3() On 10/9/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
I get this more often than not. Can someone interested take a look? Happens w/ jitrino : java:
/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:524:
const char* class_get_name(Class*): Assertion `cl' failed. SIGABRT in VM code. Stack trace: addr2line: '[vdso]': No such file 1: ?? (<D7>^<CC><A5><FE><B6><A8><DC><FD><A4><FF><E8><E3><B6>:-1) java:
/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:524:
const char* class_get_name(Class*): Assertion `cl' failed. SIGABRT in VM code. Stack trace: addr2line: '[vdso]': No such file 3: ?? (<D7>^<CC><A5><FE><B6><B8><C8><BA><BF><FF><E8><E3><B6>:-1) 2: abort (??:-1) 4: __assert_fail (??:-1) 5: abort (??:-1) 6: __assert_fail (??:-1) 7: class_get_name
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:525)
8: class_get_name
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:525)
9: Jitrino::Jet::is_magic(Class*) (??:-1) 10: Jitrino::Jet::Compiler::gen_magic() (??:-1) 11: Jitrino::Jet::Compiler::handle_inst() (??:-1) 12: Jitrino::Jet::is_magic(Class*) (??:-1) 13: Jitrino::Jet::Compiler::gen_magic() (??:-1) 14: Jitrino::Jet::Compiler::handle_inst() (??:-1) 15: Jitrino::Jet::Compiler::comp_gen_insts(unsigned int, unsigned int, unsigned int) (??:-1) 16: Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int) (??:-1) 17: Jitrino::Jet::Compiler::comp_gen_insts(unsigned int, unsigned int, unsigned int) (??:-1) 18: Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int) (??:-1) 19: Jitrino::Jet::Compiler::compile(void*, Method*, OpenMethodExecutionParams const&) (??:-1) 20: Jitrino::Jet::Compiler::compile(void*, Method*, OpenMethodExecutionParams const&) (??:-1) 21: Jitrino::Jet::compile_with_params(void*, void*, Method*, OpenMethodExecutionParams) (??:-1) 22: Jitrino::Jet::compile_with_params(void*, void*, Method*, OpenMethodExecutionParams) (??:-1) 23: JIT_compile_method_with_params (??:-1) 24: JIT_compile_method_with_params (??:-1) 25: Dll_JIT::compile_method_with_params(void*, Method*, OpenMethodExecutionParams) (/home/geir/dev/apache/harmony/enhanced/trunk/working_v m/vm/vmcore/include/dll_jit_intf.h:86) 26: compile_do_compilation_jit(Method*, JIT*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:700)
27: vm_compile_method
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:2539)
28: Dll_JIT::compile_method_with_params(void*, Method*, OpenMethodExecutionParams) (/home/geir/dev/apache/harmony/enhanced/trunk/working_v m/vm/vmcore/include/dll_jit_intf.h:86) 29: compile_do_compilation_jit(Method*, JIT*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:700)
30: vm_compile_method
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:2539)
31: DrlEMImpl::compileMethod(Method*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/DrlEMImpl.cpp:520)
32: CompileMethod
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/em_intf.cpp:50)
33: compile_do_compilation
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:780)
34: compile_jit_a_method(Method*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:828)
35: IP is 0xB6891172 <native code> 36: java/lang/FinalizerThread.wakeupFinalization()V (??:-1) 37: java/lang/FinalizerThread.startFinalization(Z)V (??:-1) 38: vm_invoke_native_array_stub
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/util/ia32/base/invoke_native_stub_i
a32.asm:41) 39: JIT_execute_method_default(void*, _jmethodID*, jvalue*, jvalue*) (/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/sr c/util/ia32/base/ini_iA32.cpp:200) 40: DrlEMImpl::compileMethod(Method*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/DrlEMImpl.cpp:520)
41: CompileMethod
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/em_intf.cpp:50)
42: compile_do_compilation
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:780)
43: compile_jit_a_method(Method*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:828)
44: IP is 0xB6891172 <native code> 45: java/lang/ref/ReferenceQueue.enqueue(Ljava/lang/ref/Reference;)Z (??:-1) 46: java/lang/ref/Reference.enqueue()Z (??:-1) 47: vm_invoke_native_array_stub
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/util/ia32/base/invoke_native_stub_i
a32.asm:41) 48: JIT_execute_method_default(void*, _jmethodID*, jvalue*, jvalue*) (/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/sr c/util/ia32/base/ini_iA32.cpp:223) 49: DrlEMImpl::executeMethod(_jmethodID*, jvalue*, jvalue*)
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/DrlEMImpl.c
pp:490) 50: ExecuteMethod
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/em/src/em_intf.cpp:44)
51: vm_execute_java_method_array(_jmethodID*, jvalue*, jvalue*) (/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/jit /ini.cpp:63) 52: Objects_To_Finalize::run_finalizers()
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/init/finalize.cpp:335)
53: vm_run_pending_finalizers()
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/init/finalize.cpp:471)
54: vm_hint_finalize
(/home/geir/dev/apache/harmony/enhanced/trunk/working_vm/vm/vmcore/src/gc/stop_the_world_root_set_enum.cpp:196)
49% --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]