JDK-7131399 : Poll system call appears to be broken on Mac OS [macosx]
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.
NET_Timeout() and NET_Poll() are not working on mac osx.
Actually this only happens with UDP sockets (j.n.DatagramSocket). It also happens with the NIO equivalent.
And most significantly, it only happens with empty packets. ie. if a client sends an empty UDP message, then poll() does not wake up. It works in all other cases. Replacing poll() with select() fixes the problem.
poll() system call is not firing on sockets.
Need to define USE_SELECT in networking code
to avoid calling NET_Poll() and implement NET_Timeout() using select() instead of poll.