Name: aaR10208 Date: 04/30/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.4.2-b21
Testbase : RegTest-cte
Platform[s] : Solaris 9 (x86) (CDE), SMP, 4 CPUs (unable to reproduce on single-CPU box).
switch/Mode : -server
Falling test[s]: CTE_REGTEST/Generic/4820217/StreamsSurviveDestroy.java
The test performs 4 steps: test(), testCloseBeforeDestroy(), testCloseAfterDestroy(), testInterrupt()
and there is an intermittent failure in the testCloseAfterDestroy().
Most probably the failure is caused by the racing in the test (see also output logs below):
the stream copiers receive EOF from the process' output and error streams and stop working before
the test calls Process.destroy(), so the test fails.
Please note, that the failure is intermittent, and I was not able to reproduce it on my single-cpu
solx86 box after 10 runs.
Test source location:
=====================
/net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST/Generic/4820217/StreamsSurviveDestroy.java
jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results/mantis/b21/regtest/x86/sol9_x86-server_smp_linux-6/workDir/cte/CTE_REGTEST/Generic/4820217/StreamsSurviveDestroy.jtr
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
JDK=/java/re/jdk/1.4.2/promoted/latest/binaries/solaris-x86
TESTBASE=//net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST
#JDK=/net/linux-15/export/home/java/jdk1.4.2/x86
#TESTBASE=/net/linux-15/export/home/java/regtest/cte
TEST=StreamsSurviveDestroy
cp ${TESTBASE}/CTE_REGTEST/Generic/4820217/$TEST.java .
${JDK}/bin/javac ${TEST}.java
${JDK}/bin/java -showversion ${TEST}
--- script end ---
Script output:
==============
[3 successful runs before]
$./doit.sh
java version "1.4.2-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-rc-b21)
Java HotSpot(TM) Client VM (build 1.4.2-rc-b21, mixed mode)
test
EOF
EOF
exit: 15
testCloseBeforeDestroy
exit: 15
out: Thrown as expected: java.io.IOException: Bad file number
err: Thrown as expected: java.io.IOException: Bad file number
testCloseAfterDestroy
EOF
EOF
exit: 15
Exception in thread "main" java.lang.Exception: out: Expected exception not thrown
at StreamsSurviveDestroy$Copier.check(StreamsSurviveDestroy.java:71)
at StreamsSurviveDestroy.testCloseAfterDestroy(StreamsSurviveDestroy.java:125)
at StreamsSurviveDestroy.main(StreamsSurviveDestroy.java:181)
Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(27/1141)----------
test
EOF
EOF
exit: 15
testCloseBeforeDestroy
exit: 15
out: Thrown as expected: java.io.IOException: Bad file number
err: Thrown as expected: java.io.IOException: Bad file number
testCloseAfterDestroy
EOF
EOF
exit: 15
java.lang.Exception: out: Expected exception not thrown
at StreamsSurviveDestroy$Copier.check(StreamsSurviveDestroy.java:71)
at StreamsSurviveDestroy.testCloseAfterDestroy(StreamsSurviveDestroy.java:125)
at StreamsSurviveDestroy.main(StreamsSurviveDestroy.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
at java.lang.Thread.run(Thread.java:534)
JavaTest Message: Test threw exception: java.lang.Exception: out: Expected exception not thrown
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.Exception: out: Expected exception not thrown
result: Failed. Execution failed: `main' threw exception: java.lang.Exception: out: Expected exception not thrown
test result: Failed. Execution failed: `main' threw exception: java.lang.Exception: out: Expected exception not thrown
Specific machine info:
======================
Hostname: linux-6
OS: Solaris 9 (x86) (CDE), SMP 4 CPUs
======================================================================