United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7127660 (macosx) *Socket Async close not working
JDK-7127660 : (macosx) *Socket Async close not working

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

Related Reports

Sub Tasks

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.
                                     
2012-01-10



Hardware and Software, Engineered to Work Together