Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 13727 invoked from network); 11 Dec 2006 13:21:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2006 13:21:43 -0000 Received: (qmail 51791 invoked by uid 500); 11 Dec 2006 13:21:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51771 invoked by uid 500); 11 Dec 2006 13:21:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 51760 invoked by uid 99); 11 Dec 2006 13:21:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 05:21:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 05:21:42 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6DA6571430D for ; Mon, 11 Dec 2006 05:21:22 -0800 (PST) Message-ID: <19321342.1165843282446.JavaMail.jira@brutus> Date: Mon, 11 Dec 2006 05:21:22 -0800 (PST) From: "Pavel Pervov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2083) [drlvm] Synchronization problem in class resolution code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-2083?page=all ] Pavel Pervov updated HARMONY-2083: ---------------------------------- Attachment: H2083.patch Attached patch is intended to fix the problem reported. Although the patch scope is wider than reported by this test - it removes cache of classes which loading or initialization had failed. So, the root of this assertion is removed from the codebase. > [drlvm] Synchronization problem in class resolution code > -------------------------------------------------------- > > Key: HARMONY-2083 > URL: http://issues.apache.org/jira/browse/HARMONY-2083 > Project: Harmony > Issue Type: Bug > Reporter: Mikhail Fursov > Attachments: H2083.patch > > > The test fails in -Xem:opt and -Xem:jet modes: > public class Test extends Thread { > static final int N_THREADS = 100; > static final int N_ITERS = 500; > public static void main(String[] args) throws Exception { > Thread threads[] = new Thread[N_THREADS]; > for (int i = 0; i < N_THREADS; i++) threads[i] = new Test(); > System.out.println("START"); > for (int i = 0; i < N_THREADS; i++) threads[i].start(); > System.out.println("JOIN"); > for (int i = 0; i < N_THREADS; i++) threads[i].join(); > System.out.println("PASSED"); > } > public void run() { > for (int i = 0; i < N_ITERS; i++) { > try { > new Missed(); > } catch (Throwable e) {} > } > } > } > class Missed { > } > compile it and remove Missed.class file > The stacktrace of failure I have is: > > harmonyvm.dll!_NMSG_WRITE(int rterrnum=10) Line 195 C > harmonyvm.dll!abort() Line 44 + 0x7 C > harmonyvm.dll!MapEx::Insert(const String * key=0x02c0d5a4, ClassLoader::FailedClass & elem={...}) Line 271 C++ > harmonyvm.dll!ClassLoader::AddFailedClass(const String * className=0x02c0d5a4, _jobject * const exn=0x02cef2a8) Line 412 C++ > harmonyvm.dll!UserDefinedClassLoader::DoLoadClass(Global_Env * env=0x011e4258, const String * className=0x02c0d5a4) Line 1862 C++ > harmonyvm.dll!ClassLoader::LoadClass(Global_Env * env=0x011e4258, const String * className=0x02c0d5a4) Line 1694 + 0x15 C++ > harmonyvm.dll!ClassLoader::LoadVerifyAndPrepareClass(Global_Env * env=0x011e4258, const String * name=0x02c0d5a4) Line 387 + 0x10 C++ > harmonyvm.dll!_resolve_class(Global_Env * env=0x011e4258, Class * clss=0x02b3d090, unsigned int cp_index=12) Line 157 + 0x13 C++ > harmonyvm.dll!_resolve_class_new(Global_Env * env=0x011e4258, Class * clss=0x02b3d090, unsigned int cp_index=12) Line 221 + 0x11 C++ > harmonyvm.dll!resolve_class_new(void * h=0x0351f8a0, Class * c=0x02b3d090, unsigned int index=12) Line 901 + 0x1a C++ > harmonyvm.dll!vm_resolve_class_new(void * h=0x0351f8a0, Class * c=0x02b3d090, unsigned int index=12) Line 902 + 0x11 C++ > jitrino.dll!Jitrino::Jet::Compiler::gen_magic() Line 106 + 0x15 C++ > jitrino.dll!Jitrino::Jet::Compiler::handle_inst() Line 51 + 0x7 C++ > jitrino.dll!Jitrino::Jet::Compiler::comp_gen_insts(unsigned int pc=0, unsigned int parentPC=47, unsigned int jsr_lead=4294967295) Line 1001 C++ > jitrino.dll!Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int pc=9) Line 819 + 0xe C++ > jitrino.dll!Jitrino::Jet::Compiler::compile(void * ch=0x0351f8a0, Method * method=0x02c175e0, const OpenMethodExecutionParams & params={...}) Line 394 C++ > jitrino.dll!Jitrino::Jet::compile_with_params(void * jit_handle=0x0123b0e0, void * ch=0x0351f8a0, Method * method=0x02c175e0, OpenMethodExecutionParams params={...}) Line 524 + 0x2c C++ > jitrino.dll!JIT_compile_method_with_params(void * jit=0x0123b0e0, void * compilation=0x0351f8a0, Method * method_handle=0x02c175e0, OpenMethodExecutionParams compilation_params={...}) Line 278 + 0x1b C++ > harmonyvm.dll!Dll_JIT::compile_method_with_params(void * compilation=0x0351f8a0, Method * method=0x02c175e0, OpenMethodExecutionParams flags={...}) Line 86 + 0x18 C++ > harmonyvm.dll!compile_do_compilation_jit(Method * method=0x02c175e0, JIT * jit=0x0123b0e0) Line 704 + 0x19 C++ > harmonyvm.dll!vm_compile_method(void * jit=0x0123b0e0, Method * method=0x02c175e0) Line 2538 + 0xd C++ > em.dll!DrlEMImpl::compileMethod(Method * mh=0x02c175e0) Line 517 + 0x13 C++ > em.dll!CompileMethod(Method * method_handle=0x02c175e0) Line 49 + 0x19 C++ > harmonyvm.dll!compile_do_compilation(Method * method=0x02c175e0, JIT_Flags flags={...}) Line 784 + 0x15 C++ > harmonyvm.dll!compile_jit_a_method(Method * method=0x02c175e0) Line 832 + 0xd C++ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira