Problems persist in KQueueSelectorProvider (Mac) in 7u6 ea

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 13 14:42:16 PDT 2012


On 13/08/2012 20:13, Jason T. Greene wrote:
> On 8/13/12 3:11 AM, Alan Bateman wrote:
> -snip-
>> I see Jason's reply on setInterest and there is indeed a problem there.
>> The specification is that changing the interest set is effective at the
>> next select operation but this Selector is doing it asynchronously. This
>> needs to be changed to batch the changes to the next select as is done
>> in the other Selector implementations. I will create a bug for that.
>
> Ah that should have been obvious to me! Thanks for that.
>
> I threw together a quick patch (attached below against 7u-dev), and it 
> appears to resolve the issues on 6 and 7. Although it needs more testing.
>
> The preClose problem disappears as well with this change. My hunch is 
> that the tight spin loop on kqueue makes it impossible for close/dup2 
> to ever complete.
>
Thanks for trying that out, it's good to hear that the problems have 
gone away. On the tight loop theory then can you check if a small sleep, 
or may a Thread.yield, causes the dup2 hang to go away too?

On the patch, are you submitting it here as a contribution (once you are 
done with your testing)? I haven't looked at it closely yet but I think 
it is close to what we have in the epoll Selector.

-Alan.




More information about the nio-dev mailing list