Problems persist in KQueueSelectorProvider (Mac) in 7u6 ea (original) (raw)

Alan Bateman Alan.Bateman at oracle.com
Mon Aug 13 07:51:57 PDT 2012


On 13/08/2012 15:06, David M. Lloyd wrote:

: We did test on 6 with similar results.

We've tested on the u6 tip as well as on previous 7 versions (we explicitly choose the selector provider), with similar results. Thanks for checking, at least this shows that we aren't dealing with something new.

:

It is definitely hanging in dup2(), as dup2() is the only thing that preClose0 actually does. As I said I implemented a test to use shutdown() instead of dup2() for preClose0 but that just moved the problem to the real close(). One thing that would be useful is a thread dump. A stack trace with the kernel frames would be useful too but may not be possible with stackshot, maybe need to come up with a dtrace script. At least with the fifo case, where we have also observed close or dup2 to hang, the issue is that it blocks waiting for an I/O on the fifo to complete.

I suspect that while both problems are related to kqueue bugs, the spin is specifically related to how setInterest works, whereas the dup2 hang/stuck process is something separate. They may be related too. In particular if dup2 has caused the file descriptor to reference the pre-close socket then it maye cause any Selector that it is registered with to spin until the key has been canceled.

-Alan.



More information about the nio-dev mailing list