Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4964306

TEST_BUG: Regression-cte test 4810806/NullPolyTest.java hangs (races)

XMLWordPrintable

    • beta
    • x86
    • windows_xp
    • Verified



      Name: vsR10238 Date: 12/05/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.5.0-b30,b29
      Testbase : Regression-cte
      Platform[s] : Windows
      Falling test[s]:
               CTE_REGTEST/Generic/4810806/NullPolyTest.java

      Regression-CTE test CTE_REGTEST/Generic/4810806/NullPolyTest.java hangs intermittently because of
      race conditions. The problem was described in 4943344 (which is 'fixed').

      The test is used for testing starting from Tiger-b29.
      It seems that the test is based on the non-fixed version of java/awt/Graphics/NullPolyTest/NullPolyTest.java.






      Below is an excerpt from 4943344:

      Regression test java/awt/Graphics/NullPolyTest/NullPolyTest.java fails intermittently
      with JDK1.5.0, JDK1.4.2.

      The problem is that waitLock.notify() in NullPolyTest.java at line 55 may be called before
      the main thread enters waitLock.wait() at line 66, causing the test to hang.

      Another minor possible problem is that waitLock.notify() is called only if the test passes.

      After I had modified the test as follows:

      14d13
      < static boolean done=false;
      54a54,56
        > synchronized (waitLock) {
        > waitLock.notify();
        > }
      56,61d57
      <
      < synchronized (waitLock) {
      < done=true;
      < waitLock.notify();
      < }
      <
      70c66
      < while (!done) waitLock.wait(100);
      ---
        > waitLock.wait();


      the test passed 10 times of 10.






      Test source location:
      =====================
      /net/jdk/export/jpse04/Regression/1.5.0/test/CTE_REGTEST/Generic/4810806/NullPolyTest.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b30/regtest/win32/winXP_smp_linux-21/workDir/cte/CTE_REGTEST/Generic/4810806/NullPolyTest.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)

      --- script start ---
      #!/bin/sh
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir

      #Paths in Java Software:
      JT_HOME="z:/jct-tools/3.1.2/archive/fcs/binaries"
      JEMMY_JAR="x:/Jemmy/jemmy.jar"
      JAVA_HOME="z:/jdk/1.5.0/promoted/all/b30/binaries/windows-i586"
      TEST_BASE_PATH="x:/Regression/1.5.0/test"

      #Alternative paths outside Java Software:
      #JT_HOME="z:/jct-tools/3.1.2/archive/fcs/binaries"
      #JEMMY_JAR="x:/Jemmy/jemmy.jar"
      #JAVA_HOME="z:/jdk/1.5.0/promoted/all/b30/binaries/windows-i586"
      #TEST_BASE_PATH="x:/Regression/1.5.0/test"

      #Alternative paths for the NSK site:
      #JT_HOME="h:/java/jct"
      #JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
      #JAVA_HOME="h:/java/jdk1.5.0/win32"
      #TEST_BASE_PATH="h:/java/regtest.tiger/cte"


      TESTVMOPTS="-client"
      CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar"

      TEST="CTE_REGTEST/Generic/4810806/NullPolyTest.java"

      mkdir -p $WORK_DIR/scratch 2>&1
      mkdir -p $WORK_DIR/jtData 2>&1
      mkdir -p $REPORT_DIR 2>&1

      #rm $WORK_DIR/jtData/ResultCache.jtw 2>&1

      cd $WORK_DIR/scratch

      $JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,SystemRoot=$SystemRoot,PATH=${SHELL%/*},CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-21" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"

      --- script end ---

      Script output:
      ==============

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(0/0)----------
      result: Failed. Execution failed: Program `e:/j2sdk1.5.0 in\java' interrupted! (timed out?)


      test result: Failed. Execution failed: Program `e:/j2sdk1.5.0 in\java' interrupted! (timed out?)


      Specific machine info:
      ======================
      Hostname: linux-21
      OS: Windows XP Home



      ======================================================================

            asaha Abhijit Saha
            vshsunw Vsh Vsh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: