RFR of JDK-8157543,java/nio/channels/Selector/SelectAndCancel.java fails intermittently
Hamlin Li
huaming.li at oracle.com
Tue Apr 24 10:08:43 UTC 2018
On 24/04/2018 3:20 PM, Alan Bateman wrote:
> 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.
Hi Alan,
Thank you for reviewing.
> The only issue is first thread now throws RuntimeException and isn't
> clear if this will be shown in the output if it happens
I'm not sure if I understand you correctly, do you mean if the new
RuntimeException will be written to jtreg log when it happens? Yes, I
added some faulty code to verify it.
> (the original 1.4 era bug report was that select was throw IOException).
Original code just report the issue(IOException), but does not throw it,
I think it's not correct, and it's easy for engineer/test to miss something.
In the patch, no matter which of 3 methods(configureBlocking, register,
select) throw IOException, it will be wrapped in a RuntimeException,
then rethrow. If any other unchecked exception is thrown, just let it be.
Thank you
-Hamlin
>
> -Alan
More information about the nio-dev
mailing list