Problems persist in KQueueSelectorProvider (Mac) in 7u6 ea
David M. Lloyd
david.lloyd at redhat.com
Fri Aug 10 16:36:39 PDT 2012
We're consistently seeing issues under load on Mac with
KQueueSelectorProvider.
There are two possibly related symptoms: the KQueueSelectorImpl is going
into a mode where select() does not block, despite the continued
emptiness of the selected key set; and FileDispatcherImpl#preClose0 is
hanging, presumably in dup2(), trying to close a socket.
My current hypothesis that some evil race condition exists and is being
tripped between kqueue and dup2 (a relatively rare way to close a
socket, at least until NIO came along I guess). My thought though is
that sockets should not be preclosed this way: instead it would be
better to use shutdown(fd, SHUT_RDWR), which would effectively preclose
the socket and hopefully dodge this issue.
I'm hopefully going to have time to try out a patch which does this, but
I'm taking a couple weeks off starting tonight so I may not have time,
so we shall see.
--
- DML
More information about the nio-dev
mailing list