United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7131399 : Poll system call appears to be broken on Mac OS [macosx]

Details
Type:
Bug
Submit Date:
2012-01-19
Status:
Closed
Updated Date:
2013-08-27
Project Name:
JDK
Resolved Date:
2012-03-27
Component:
core-libs
OS:
os_x
Sub-Component:
java.net
CPU:
unknown,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7,7u4
Fixed Versions:
7u4 (b11)

Related Reports
Relates:

Sub Tasks

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



Hardware and Software, Engineered to Work Together