United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7057320 test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently
JDK-7057320 : test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently

Details
Type:
Bug
Submit Date:
2011-06-21
Status:
Closed
Updated Date:
2013-09-04
Project Name:
JDK
Resolved Date:
2012-05-07
Component:
core-libs
OS:
generic
Sub-Component:
java.util.concurrent
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
I've seen this test fail on at least two occasions on linux-x86 with jdk7-b145. The tests are run with -agentvm and so are running tests sequentially in the same VM (to avoid starting a VM per test). It's possible that there are threads from previous tests or longer GC times due to garabge from previous tests that may be an influence here.


#Test Results (version 2)
#Tue Jun 21 12:54:22 IST 2011
#checksum:38b2177ceef6127e
#-----testdescription-----
$file=/export/Users/ab23780/ws/jdk8/tl/jdk/test/java/util/concurrent/Executors/AutoShutdown.java
$root=/export/Users/ab23780/ws/jdk8/tl/jdk/test
author=Martin Buchholz
keywords=bug6399443 othervm
run=USER_SPECIFIED main/othervm AutoShutdown\n
source=AutoShutdown.java
title=Check for auto-shutdown and gc of singleThreadExecutors

#-----environment-----

#-----testresult-----
description=file:/export/Users/ab23780/ws/jdk8/tl/jdk/test/java/util/concurrent/Executors/AutoShutdown.java
elapsed=473 0:00:00.473
end=Tue Jun 21 12:54:22 IST 2011
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Some tests failed
hostname=localhost
javatestOS=Linux 2.6.31-14-generic (i386)
javatestVersion=4.1.4
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build compile main
start=Tue Jun 21 12:54:21 IST 2011
test=java/util/concurrent/Executors/AutoShutdown.java
work=/u/alanb/tmp/JTwork/java/util/concurrent/Executors

#section:script_messages
----------messages:(4/194)----------
JDK under test: (/java/re/jdk/7/latest/binaries/linux-i586)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b145)
Java HotSpot(TM) Server VM (build 21.0-b15, mixed mode)

#section:build
----------messages:(3/97)----------
command: build AutoShutdown
reason: Named class compiled on demand
elapsed time (seconds): 0.032
result: Passed. Build successful

#section:compile
----------messages:(3/188)----------
command: compile /export/Users/ab23780/ws/jdk8/tl/jdk/test/java/util/concurrent/Executors/AutoShutdown.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.032
result: Passed. Compilation successful

#section:main
----------messages:(3/119)----------
command: main AutoShutdown
reason: User specified action: run main/othervm AutoShutdown 
elapsed time (seconds): 0.441
----------System.out:(4/42)----------
3 not equal to 1

Passed = 1, failed = 1

----------System.err:(26/1416)----------
java.lang.Exception: Stack trace
	at java.lang.Thread.dumpStack(Thread.java:1342)
	at AutoShutdown.fail(AutoShutdown.java:76)
	at AutoShutdown.fail(AutoShutdown.java:77)
	at AutoShutdown.equal(AutoShutdown.java:81)
	at AutoShutdown.realMain(AutoShutdown.java:70)
	at AutoShutdown.main(AutoShutdown.java:83)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)
java.lang.AssertionError: Some tests failed
	at AutoShutdown.main(AutoShutdown.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.AssertionError: Some tests failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Some tests failed
result: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Some tests failed


test result: Failed. Execution failed: `main' threw exception: java.lang.AssertionError: Some tests failed

                                    

Comments
EVALUATION

Add retry/timeout for checking activeCount.

JDK8 changeset:

Changeset: db419c454f92
Author:    dl
Date:      2011-07-13 12:24 +0100
URL:       http://hg.openjdk.java.net/jdk8/tl/jdk/rev/db419c454f92

7057320: test/java/util/concurrent/Executors/AutoShutdown.java failing intermittently
Summary: Add retry/timeout for checking activeCount
Reviewed-by: chegar

! test/java/util/concurrent/Executors/AutoShutdown.java
                                     
2011-07-13



Hardware and Software, Engineered to Work Together