You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vera Petrashkova (JIRA)" <ji...@apache.org> on 2007/05/03 08:23:15 UTC

[jira] Updated: (HARMONY-3797) [drlvm][jit] VM from debug build crashes on thread starting

     [ https://issues.apache.org/jira/browse/HARMONY-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vera Petrashkova updated HARMONY-3797:
--------------------------------------

    Summary: [drlvm][jit] VM from debug build crashes on thread starting  (was: [drlvm][jit] VM ftom debug build crashes on thread starting)

> [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
>            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 <init>(Lw2;Ljava/lang/Object;)V
>     .limit stack 2
>     .limit locals 3
>     ; default initializer
>     aload_0
>     invokespecial java/lang/Thread/<init>()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.