The NIO native code should be examined to see if there are any
placed where it should restart following interruption by a
signal -- ie: any system calls that return EINTR.
Specifically the following should be reviewed on Solaris/Linux :-
- SocketChannelImpl.accept as accept is not automatically
- Selector implementor based on "poll" may not be automatically
started (SocketChannel.finishConnect also; /dev/poll should be
okay because ioctl is automatically restarted).
Further notes :-
4178050 & 4425033 were recently fixed in HotSpot to ensure that system
calls are transparent restarted. This addresses the issue for
legacy networking as it must use HPI for blocking I/O (to get
the interruptable I/O semantics on Solaris).
Solaris lwp signal handler redirects process signal (such as
SIGPIPE). The "alogrithm" it uses to pick a thread makes it
more likely to pick a blocked thread.
If poll is interrupted and transparently restart it may be
necesary to adjust the timeout -- eg: if EINTR after x ms
then need to restart poll with timeout-x ms.