RFR[11] of JDK-8208280,java/nio/channels/Selector/RegisterDuringSelect.java fails with "key not removed from key set"
Hamlin Li
huaming.li at oracle.com
Fri Aug 10 05:14:12 UTC 2018
On 2018/8/9 6:51 PM, Alan Bateman wrote:
>
> On 30/07/2018 06:38, Hamlin Li wrote:
>>
>> On 2018/7/27 4:52 PM, Alan Bateman wrote:
>>> Thread.sleep is going to be problematic here. Also the duration is
>>> nothing to do with the timeout factor specified to jtreg so I don't
>>> think we should be using adjustTimeout either. Instead I think we
>>> will need to change this test to synchronize with the selection
>>> operations.
>> As the root cause is 2nd wakeup will impact not only 2nd select but
>> possibly 3rd select at some situation, so I think it's better to
>> separate all the tests totally, i.e. setup selector for every test
>> freshly, rather than reuse selector among these tests.
>> new webrev: http://cr.openjdk.java.net/~mli/8208280/webrev.01/
>>
> No objection to dropping the use of phaser from this test but I'm
> concerned that this version isn't providing any guarantee that it's
> testing that these methods can be called while a selection operation
> is in progress. It's similar to the discussion we had here about the
> SelectAndClose test in (JDK-8203765) where we converged on spinning
> until the the selectedKey set was locked as an indication that the
> selection operation is in progress. I think we can do something
> similar here. I'm happy to take this one if you'd like.
Sure, it's updated, please help to review it:
http://cr.openjdk.java.net/~mli/8208280/webrev.02/
Thank you
-Hamlin
>
> -Alan
More information about the nio-dev
mailing list