-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2, 5.0
-
itanium
-
linux
Name: vsR10238 Date: 06/24/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.4.2, JDK1.4.1, JDK1.5.0
Testbase : Regression-test
Platform[s] : RedHat Linux 2.1 Adv. Server
Falling test[s]:
java/awt/Focus/TemporaryLostComponentDeadlock/TemporaryLostComponentDeadlock.html
Regression test java/awt/Focus/TemporaryLostComponentDeadlock/TemporaryLostComponentDeadlock.html
from the Regression-test test suite for JDK1.4.2-b28 fails on JDK1.4.1, JDK1.4.2, JDK1.5.0.
The test passes intermittently on JDK1.4.2, JDK1.5.0.
The test fails because of race conditions: the thread that calls frame1.dispose() and
frame1.notify exits before the main thread enters frame1.wait().
Here is an excerpt from TemporaryLostComponentDeadlock.java:
new Thread() {
public void run() {
/* when I added the following line the test passed
try{ Thread.sleep(1000); } catch( InterruptedException ie) {}
*/
synchronized(frame1) {
frame1.dispose();
synchronized(frame1) {
frame1.notify();
}
}
}
}.start();
try {
synchronized(frame1) {
frame1.wait();
}
} catch( InterruptedException ie) {
}
Sysout.println("Test PASSED");
I modified the test source as shown above and the test started to pass everytime.
Test source location:
=====================
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/awt/Focus/TemporaryLostComponentDeadlock/TemporaryLostComponentDeadlock.html
jtr file location:
==================
/net/jtgb4u4c/export/sail16/results.2/mantis/b28/regtest/linux/RH21AS_server_jcc_itanium_01/workDir/test/java/awt/Focus/TemporaryLostComponentDeadlock/TemporaryLostComponentDeadlock.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
JT_HOME="/net/jtgb4u4c/export/sail16/jct-tools/3.1.1"
#JAVA_HOME=/net/jtgb4u4c/export/sail16/JDK/1.4.1-b21/linux-ia64
JAVA_HOME="/export/j2sdk1.4.2"
#JAVA_HOME="/export/j2sdk1.4.2-b26"
#JAVA_HOME="/export/j2sdk1.5.0"
TEST_BASE_PATH="/net/jtgb4u4c/export/sail16/vsh/scripts/5/Regression/test"
JEMMY_JAR=/net/jtgb4u4c/export/sail16/Jemmy/jemmy.jar
HOST=`uname -n`
TESTWITH=$JAVA_HOME
TESTJAVA=$JAVA_HOME
JTOPTS="-server"
TESTVMOPTS="-server"
CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"
export JAVA_HOME
export JT_HOME
export TESTWITH
export CLASSPATH
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 -cp $CLASSPATH $JTOPTS \
-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="$HOST" -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/java/awt/Focus/TemporaryLostComponentDeadlock/TemporaryLostComponentDeadlock.html"
--- script end ---
Script output:
==============
Test output (jtr part):
=======================
----------System.out:(1/47)----------
Any messages for the tester will display here.
----------System.err:(6/172)----------
Warning:
Name: HorScrollBar
Class: XmScrollBar
The specified scrollbar value is greater than the maximum
scrollbar value minus the scrollbar slider size.
result: Failed. Execution failed: Program `/export/j2sdk1.4.2/bin/java' interrupted! (timed out?)
test result: Failed. Execution failed: Program `/export/j2sdk1.4.2/bin/java' interrupted! (timed out?)
Specific machine info:
======================
Hostname: JCC-ITANIUM-01
OS: RedHat Linux 2.1 Adv. Server
======================================================================