Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 5094 invoked from network); 1 Jun 2007 11:33:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jun 2007 11:33:24 -0000 Received: (qmail 31920 invoked by uid 500); 1 Jun 2007 11:06:46 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 31903 invoked by uid 500); 1 Jun 2007 11:06:46 -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 31885 invoked by uid 99); 1 Jun 2007 11:06:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2007 04:06:45 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Fri, 01 Jun 2007 04:06:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D543B714184 for ; Fri, 1 Jun 2007 04:06:15 -0700 (PDT) Message-ID: <7221172.1180695975870.JavaMail.jira@brutus> Date: Fri, 1 Jun 2007 04:06:15 -0700 (PDT) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-3797) [drlvm][jit] VM from debug build crashes on thread starting In-Reply-To: <15336332.1178098995514.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Varlamov reassigned HARMONY-3797: ---------------------------------------- Assignee: Alexey Varlamov > [drlvm][jit] VM from debug build crashes on thread starting > ----------------------------------------------------------- > > Key: HARMONY-3797 > URL: https://issues.apache.org/jira/browse/HARMONY-3797 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Windows and Linux > Reporter: Vera Petrashkova > Assignee: Alexey Varlamov > Priority: Minor > Attachments: w1_w2_classes.zip > > > The following synthetic test demonstrates that debug VM crashes when it tries to start thread. > It is occurred on jitrino in default, jet and opt modes. > But test passes on interpreter. > It also passes on release VM. > -------------------w1.jj------------------------------ > .class public w1 > .super java/lang/Thread > .field master Lw2; > .field testLock Ljava/lang/Object; > ; > ; constructor > ; > .method public (Lw2;Ljava/lang/Object;)V > .limit stack 2 > .limit locals 3 > ; default initializer > aload_0 > invokespecial java/lang/Thread/()V > ; setup fields with passed values > aload_0 > aload_1 > putfield w1/master Lw2; > aload_0 > aload_2 > putfield w1/testLock Ljava/lang/Object; > return > .end method > ; > ; run method > ; > .method public run()V > .limit stack 4 > .limit locals 5 > .catch java/lang/InterruptedException from WaitStart to WaitEnd using Catcher > ; acquire monitor on testLock > aload_0 > getfield w1/testLock Ljava/lang/Object; > dup > astore_1 ; testLock > monitorenter > aload_0 > getfield w1/master Lw2; > astore_2 ; master > > ; report to master that we've been started > ; by synchronous master.threadCounter++ > aload_2 > monitorenter > aload_2 > dup > getfield w2/threadCounter I > iconst_1 > iadd > putfield w2/threadCounter I > aload_2 > monitorexit > ; testLock.wait() > WaitStart: > aload_1 > invokevirtual java/lang/Object/wait()V > aconst_null ; stub exception for Catcher handler > WaitEnd: > Catcher: > aload_1 > monitorexit > ; report to master that we've been awaken > ; by synchronous master.reenabledCounter++ > aload_2 > monitorenter > aload_2 > dup > getfield w2/reenabledCounter I > iconst_1 > iadd > putfield w2/reenabledCounter I > aload_2 > invokevirtual java/lang/Object/notifyAll()V > aload_2 > monitorexit > return > .end method > ---------------------w2.java------------------------- > public class w2 { > > public int threadCounter; > public int reenabledCounter; > public w2 () { > super(); > threadCounter = 0; > reenabledCounter = 0; > } > > public static int delay = 1000; > > public static void main(String[] args) { > w2 tt = new w2(); > int r = tt.testTimed(delay); > System.exit(r); > } > public synchronized int testTimed(int dl) { > Object ll = new Object(); > w1 t1 = new w1(this, ll); > w1 t2 = new w1(this, ll); > int res; > try { > t1.start(); > System.out.println("Startted thread 1"); > t2.start(); > System.out.println("Startted thread 2"); > do { > wait((long)dl); > } while (threadCounter != 2); > synchronized(ll) { > ll.notifyAll(); > } > res = 2; > do { > wait(delay); > if (reenabledCounter == 2) { > return 104; > } > res = res - 1; > } while (res !=0); > } catch (InterruptedException e) { > e.printStackTrace(); > } > t1.interrupt(); > t2.interrupt(); > return 105; > > > } > } > -------------------------------- > To reproduce this bug create w1 class using jasmin.jar or use class file from attachment > Run w2 class > java -XXvm.assert_dialog=false w2 > java -XXvm.assert_dialog=false -Xem:jet w2 > java -XXvm.assert_dialog=false -Xem:opt w2 > Output on debug VM is: > ==================== > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l > icensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r533751, (Apr 30 2007), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > Assertion failed: m_jframe->dip(0).is_reg() && m_jframe->dip(0).reg() == gr_ret, file C:\l > ab_drlbuild\combined_msvc_d\s0501\working_vm\vm\jitrino\src\jet\cg_regs.cpp, line 627 > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > Assertion failed: depth == 0, file C:\lab_drlbuild\combined_msvc_d\s0501\working_vm\vm\jit > rino\src\main\PMF.cpp, line 708 > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > This application has requested the Runtime to terminate it in an unusual way. > Please contact the application's support team for more information. > Output on interpreter is: > =================== > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l > icensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r533751, (Apr 30 2007), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > Startted thread 1 > Startted thread 2 > Output on release VM is: > ==-================ > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l > icensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r533751, (May 1 2007), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > Startted thread 1 > Startted thread 2 > This test also passes on RI: > ======================= > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > Startted thread 1 > Startted thread 2 > This bug causes the failures of the following tests from DRLVM Validation Test Suite (see: http://issues.apache.org/jira/browse/HARMONY-3206) > vm.jvms.threads.threads247.threads24701.threads24701 > vm.jvms.threads.threads250.threads25001.threads25001 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.