A race problem about select in a small time window

Sean Chou zhouyx at linux.vnet.ibm.com
Tue Mar 12 02:58:06 PDT 2013


The code looks fine, I tried with the test case in first mail and it
passed.
I'll try to run more testcases which need one or two days.
It's a sudden you removed the Updator layer.


On Mon, Mar 11, 2013 at 5:16 AM, Alan Bateman <Alan.Bateman at oracle.com>wrote:

> On 07/03/2013 17:40, Alan Bateman wrote:
>
>>
>> Sean - just a brief mail to say that I agree that there is an issue here
>> (your changes to the impl. to reliably duplicate it are very useful). I
>> need to study it a bit more before commenting on the proposed fix because
>> it's a complicated scenario and also isOpen can return true at any time
>> (due to async close). I will get back to you soon on this.
>>
>> -Alan
>>
> I've created 8009751 to track this issue and I've put a preliminary fix
> here:
>
> http://cr.openjdk.java.net/~**alanb/8009751/webrev/<http://cr.openjdk.java.net/~alanb/8009751/webrev/>
>
> The changes essentially mean that the Selector will now maintain an
> accurate view of the registrations so that the bulk update (at select time)
> does not need to be concerned with the channel state. For interestOps then
> it keeps it very simple as it just "queues" the update. The release is also
> simple as it do longer need to iterate over the pending updates.
>
> So far I've only done limited testing but all tests that I've tried so far
> pass. I don't know the background to your test case/patch but it would be
> great if you could test the patch with the application or test that you
> originally ran into this issue with.
>
> I think for now we can use 8009751 for this issue. As part this patch I've
> also changed a lot of other code (impact the other Selectors) but I'll this
> back for now so as now (the clean-up can be done in a later bug).
>
> -Alan.
>



-- 
Best Regards,
Sean Chou
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20130312/ad7086ef/attachment.html 


More information about the nio-dev mailing list