United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8027212 : TEST_BUG: java/nio/channels/Selector/SelectAfterRead.java fails intermittently

Details
Type:
Bug
Submit Date:
2013-10-24
Status:
Resolved
Updated Date:
2014-09-04
Project Name:
JDK
Resolved Date:
2013-12-14
Component:
core-libs
OS:
Sub-Component:
java.nio
CPU:
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
TESTFAIL:java/nio/channels/Selector/SelectAfterRead.java

The test java/nio/channels/Selector/SelectAfterRead.java fails in nightly intermittenly. see details below:

#section:main
----------messages:(3/131)----------
command: main SelectAfterRead
reason: Assumed action based on file name: run main SelectAfterRead 
elapsed time (seconds): 181.049
----------rerun:(18/1252)*----------
DISPLAY=sc11152338.us.oracle.com:1 \\
HOME=/Users/aurora \\
PATH=/bin:/usr/bin \\
TZ=PST8PDT \\
    /Users/aurora/sandbox/jdk/bin/java \\
        -Dtest.vm.opts='-ea -esa -Xmx512m' \\
        -Dcompile.jdk=/Users/aurora/sandbox/jdk \\
        -Dtest.src.path=/Users/aurora/sandbox/testbase/test/java/nio/channels/Selector \\
        -Dtest.src=/Users/aurora/sandbox/testbase/test/java/nio/channels/Selector \\
        -Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \\
        -Dtest.class.path=/Users/aurora/sandbox/gresults/testoutput/jdk_nio/JTwork/classes/java/nio/channels/Selector \\
        -Dtest.classes=/Users/aurora/sandbox/gresults/testoutput/jdk_nio/JTwork/classes/java/nio/channels/Selector \\
        -Dtest.class.path.prefix=/Users/aurora/sandbox/gresults/testoutput/jdk_nio/JTwork/classes/java/nio/channels/Selector:/Users/aurora/sandbox/testbase/test/java/nio/channels/Selector \\
        -Dtest.jdk=/Users/aurora/sandbox/jdk \\
        -Dtest.java.opts=-d64 \\
        -Dtest.compiler.opts= \\
        -classpath /Users/aurora/sandbox/gresults/testoutput/jdk_nio/JTwork/classes/java/nio/channels/Selector:/Users/aurora/sandbox/testbase/test/java/nio/channels/Selector:/Users/aurora/sandbox/jdk/lib/tools.jar \\
        SelectAfterRead
----------System.err:(12/607)----------
java.lang.Exception: One selected key expected
	at SelectAfterRead.main(SelectAfterRead.java:69)
	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:483)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:746)
	at java.lang.Thread.run(Thread.java:744)

JavaTest Message: Test threw exception: java.lang.Exception
JavaTest Message: shutting down test

result: Error. Error while cleaning up threads after test


test result: Error. Error while cleaning up threads after test
                                    

Comments
URL:   http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/1f351ad06e95
User:  lana
Date:  2014-01-15 02:08:46 +0000

                                     
2014-01-15
On further examination, this test (and others based on ByteServer) can be simplified as they don't require multiple threads to create the conditions that the tests require.
                                     
2013-12-14
URL:   http://hg.openjdk.java.net/jdk9/dev/jdk/rev/1f351ad06e95
User:  alanb
Date:  2013-12-14 09:32:41 +0000

                                     
2013-12-14
Webrev link:
http://cr.openjdk.java.net/~ewang/JDK-8027212/webrev.00/
                                     
2013-11-25
RFR mail link:
http://mail.openjdk.java.net/pipermail/nio-dev/2013-November/002407.html
                                     
2013-11-19
Root Cause:
The test is based on bad assumption that ByteServer thread is started within 1 second before sel.select(TIMEOUT) is called. (TIMEOUT=1000).

Suggested Fix:
Make sure the server is started before the call sel.select(TIMEOUT).
                                     
2013-11-15
I'm resolving this bug as incomplete as we need much more information about the environment (OS version in particular). Also some evidence to explain why it submitted a test bug - I ask this because if this test is failing then it may indicate a JDK or OS issue.
                                     
2013-10-24



Hardware and Software, Engineered to Work Together