-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b31
-
generic
-
generic
-
Verified
Name: vsR10238 Date: 10/24/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.5.0
Testbase : Regression-test
Platform[s] : Suse Linux 8.2
Falling test[s]:
java/awt/Graphics/NullPolyTest/NullPolyTest.java
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:
=====================
/java/re/jdk/1.5.0/promoted/all/b24/ws/j2se/test/java/awt/Graphics/NullPolyTest/NullPolyTest.java
jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b24/regtest/linux/suse8.2_gnome_linux-2/workDir/test/java/awt/Graphics/NullPolyTest/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="/java/re/jct-tools/3.1.2/archive/fcs/binaries"
JEMMY_JAR="/net/jdk/export/jpse04/Jemmy/jemmy.jar"
JAVA_HOME="/java/re/jdk/1.5.0/promoted/all/b24/binaries/linux-i586"
TEST_BASE_PATH="/java/re/jdk/1.5.0/promoted/all/b24/ws/j2se/test"
#Alternative paths outside Java Software:
#JT_HOME="/net/koori.sfbay/onestop/jct-tools/3.1.2/archive/fcs/binaries"
#JEMMY_JAR="/net/jdk/export/jpse04/Jemmy/jemmy.jar"
#JAVA_HOME="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b24/binaries/linux-i586"
#TEST_BASE_PATH="/net/koori.sfbay/onestop/jdk/1.5.0/promoted/all/b24/ws/j2se/test"
#Alternative paths for the NSK site:
#JT_HOME="/net/linux-15/export/home/java/jct"
#JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
#JAVA_HOME="/net/linux-15/export/home/java/jdk1.5.0/linux"
#TEST_BASE_PATH="/net/linux-15/export/home/java/regtest.tiger/test"
TESTVMOPTS="-client"
CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
TEST="java/awt/Graphics/NullPolyTest/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,HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-2" -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 ---
Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(228/14566)----------
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException
...
java.lang.NullPointerException
...
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException: coordinate array
...
java.lang.NullPointerException
...
java.lang.NullPointerException
...
result: Failed. Execution failed: Program `/net/linux-15/export/home/java/jdk1.5.0/linux/bin/java' interrupted! (timed out?)
test result: Failed. Execution failed: Program `/net/linux-15/export/home/java/jdk1.5.0/linux/bin/java' interrupted! (timed out?)
Specific machine info:
======================
Hostname: linux-2
OS: Suse Linux 8.2 (GNOME2)
======================================================================
- relates to
-
JDK-4964306 TEST_BUG: Regression-cte test 4810806/NullPolyTest.java hangs (races)
- Closed