Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8278662 | 19 | Alan Bateman | P3 | Resolved | Fixed | team |
There are several thread safety issues in java.net.ServerSocket. These can be fixed by:
1. Changing impl to be a final field.
2. Promote closeLock to be a general "state lock" and require it to set the (volatile) created, bound, and closed fields.
3. Use the state lock when binding so that it can coordinate with async close of the ServerSocket.
1. Changing impl to be a final field.
2. Promote closeLock to be a general "state lock" and require it to set the (volatile) created, bound, and closed fields.
3. Use the state lock when binding so that it can coordinate with async close of the ServerSocket.
- backported by
-
JDK-8278662 ServerSocket is not thread safe
-
- Resolved
-
- duplicates
-
JDK-8276955 Revisit synchronization in Socket/ServerSocket classes.
-
- Closed
-