possible NIO selector leak in 7u25
David M. Lloyd
david.lloyd at redhat.com
Fri Jul 5 06:37:29 PDT 2013
On 7/5/13 2:31 AM, Alan Bateman wrote:
> On 04/07/2013 21:50, David M. Lloyd wrote:
>> On 7/4/13 1:53 PM, Alan Bateman wrote:
>>> On 04/07/2013 19:43, David M. Lloyd wrote:
>>>> XNIO uses Selectors (usually PollSelectorImpls) which are cached per
>>>> thread in order to mix blocking and non-blocking I/O. If you are
>>>> starting many short-lived threads and doing blocking operations on
>>>> XNIO channels then this might explain what is happening. The answer
>>>> is basically "don't do that".
>>> When you say "usually PollSelectorImpls" then it normally run with it
>>> configured to use the poll based Selector?
>> Yeah it will prefer PollSelectorImpl for temporary selectors, but will
>> ultimately fall back to whatever the default provider gives.
> So I guess it must be make direct use of sun.nio.ch? Just curious as I
> can't see how this would work otherwise.
Correct, though in a somewhat defensive manner. It'll still work if
that package is missing, just by using the default.
More information about the nio-dev