JDK-7127660 : (macosx) *Socket Async close not working
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: unknown
  • Submitted: 2012-01-06
  • Updated: 2012-03-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
the asynchronous close functionality required on Linux/BSD oses is not working on Mac OS X yet. There are a few problems

1. The bsd_close.c code is not compiled in due to missing macro in net_util_md.h

2. NET_Accept is not using the BLOCKING macro

3. Interestingly, pthread mutexes must be explicitly initialized on Macosx and our code was not checking
   the return code of pthread_mutex_lock() which was failing silently and therefore not synchronising 
   properly and causing actual memory corruption and crashes.

Comments
EVALUATION Actually NET_Accept() uses NET_Timeout for its blocking. So, it can call accept() in a non-blocking way. Apart from that, the bug was fixed as in description.
10-01-2012