JDK 9 RFR of JDK-8151582: (ch) test java/nio/channels/AsyncCloseAndInterrupt.java failing due to "Connection succeeded"
Hamlin Li
huaming.li at oracle.com
Thu Mar 10 05:55:27 UTC 2016
On 2016/3/10 6:46, Brian Burkhalter wrote:
> Hi Hamlin,
>
> I am a bit confused about some things here. Firstly the issue is filed
> as the test failing on the Windows OS only, but some comments indicate
> that failures have been observed on Linux as well.
Hi Brian,
Thanks for point out this. My bad, I should have realized this earlier.
In fact there are 2 kinds of issue mixed in original bug JDK-8068693
<https://bugs.openjdk.java.net/browse/JDK-8068693>.
1. one occurred only on windows, there are 5 failures, 1 failed
against 6u101b10, 3 of them failed against 1.8.0_40, 1 failed against
1.9.0. The latest failure happened at at 2015-05-13 is against 6u101b10.
The issue never happened since then.
Pipe.SourceChannel/read/interrupt
java.lang.Exception: Pipe.SourceChannel/read/interrupt timed out
at TestThread.finishAndThrow(TestThread.java:83)
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:602)
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:609)
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:632)
at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:732)
2. another occurred only on linux, which are test related to
FINISH_CONNECT and happened 6 times from 2015-11-10 to 2016-02-29.
SocketChannel/finishConnect/close
finishConnect wait for pumping refuser ...
java.lang.Exception: SocketChannel/finishConnect/close threw an exception
at TestThread.finishAndThrow(TestThread.java:80)
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:602)
at AsyncCloseAndInterrupt.test(AsyncCloseAndInterrupt.java:622)
at AsyncCloseAndInterrupt.main(AsyncCloseAndInterrupt.java:720)
... ...
Caused by: java.lang.RuntimeException: Connection succeeded
at AsyncCloseAndInterrupt$16.doIO(AsyncCloseAndInterrupt.java:374)
at AsyncCloseAndInterrupt$Tester.go(AsyncCloseAndInterrupt.java:485)
at TestThread.run(TestThread.java:55)
My current fix is just for the second issue as it happens so frequently
recently, and I can make sure it's a test issue.
To make the bug more clearer, I file a new bug to track the second
issue, JDK-8151582 <https://bugs.openjdk.java.net/browse/JDK-8151582>
> Secondly, the change in the backlog setting occurs in the
> initRefuser() method which is invoked only if TestUtil.onWindows() is
> false, i.e., the test is not being run on Windows. So one would think
> that the backlog change would have no effect on Windows.
Yes, backlog are only used for CONNECT and FINISH_CONNECT tests which
use initRefuser() and will not be run on windows.
> Thirdly, if the test is being run with assertions enabled, then it
> appears that line 517 would throw an AssertionError on Windows and
> your changes at lines 523, 532, and 544-547 would never be executed.
As said above, FINISH_CONNECT test is only run on non-windows, so the
"assert" will not be executed on Windows. My change is only for
FINISH_CONNECT test case failure which will not be run on windows.
> Hopefully I am just misinterpreting something here.
No, you helped to identify the bug description is not clear, thanks a
lot.:-)
As I filed a new bug, would you please help to review it at new place:
http://cr.openjdk.java.net/~mli/8151582/webrev.00/, only updated the bug
id in the source code.
bug: https://bugs.openjdk.java.net/browse/JDK-8151582
Thank you
-Hamlin
>
> Thanks,
>
> Brian
>
> On Mar 4, 2016, at 2:36 AM, Hamlin Li <huaming.li at oracle.com
> <mailto:huaming.li at oracle.com>> wrote:
>
>> Please review the patch for test
>> java/nio/channels/AsyncCloseAndInterrupt.java
>>
>> It's a test issue. The issue can be reproduced locally within 50
>> rounds of run.
>> Root cause: even if server's connection backlog seems to be saturated
>> sometime, subsequent connections may still success.
>> Suggested Fix: Pass in parameter backlog as 1 when ServerSocket calls
>> bind to make the socket server's backlog queue as short as possible.
>> In pumpRefuser, try to connect to refuser server as quick as
>> possible. The fix run successfully for 300 rounds of run locally,
>> pass JPRT test.
>>
>> bug:https://bugs.openjdk.java.net/browse/JDK-8068693
>> webrev:http://cr.openjdk.java.net/~mli/8068693/webrev.00/
>> <http://cr.openjdk.java.net/%7Emli/8068693/webrev.00/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160310/3617aff9/attachment-0001.html>
More information about the nio-dev
mailing list