JDK-7131399 : Poll system call appears to be broken on Mac OS [macosx]
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7,7u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic,unknown
  • Submitted: 2012-01-19
  • Updated: 2013-08-27
  • Resolved: 2012-03-27
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 Availability Release.

To download the current JDK release, click here.
JDK 7
7u4 b11Fixed
Description
NET_Timeout() and NET_Poll() are not working on mac osx.

Comments
EVALUATION 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.
23-01-2012

EVALUATION 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.
19-01-2012