RFR of JDK-8157543,java/nio/channels/Selector/SelectAndCancel.java fails intermittently
Alan Bateman
Alan.Bateman at oracle.com
Tue Apr 24 07:20:43 UTC 2018
On 23/04/2018 09:45, Hamlin Li wrote:
> would you please review the following patch?
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8157543
>
> webrev: http://cr.openjdk.java.net/~mli/8157543/webrev.00/
There isn't much information in the bug report. The test should execute
in a shade over 6s but it seems jtreg is trying to kill it after 128s,
thus interrupting the sleep at L82. In addition, there seems to be
another failure mode where the first thread hasn't got to the point of
configuring the listener channel to non-blocking before it is closed by
the second thread, started 3 seconds later. I assume this means that the
test system is completely overloaded at the time, maybe there is a
really long GC or maybe other agent VMs are hogging all the resources.
Assuming I have this tight then I think your changes look okay as sleep
is always too brittle to reply on in tests. The only issue is first
thread now throws RuntimeException and isn't clear if this will be shown
in the output if it happens (the original 1.4 era bug report was that
select was throw IOException).
-Alan
More information about the nio-dev
mailing list