[9.0] Guard against empty Accept address #111366
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports #108616
Fixes #108026 and #102663
/cc @wfurt
Customer Impact
There is problem in 8.0+ when
Socket.Accept
can fail and throw exception on background thread on macOS, which leads to application termination. This was already reported by 2 customers who upgraded to 8.0 from previous LTS 6.0 - see #108026 and #102663.Regression
Prior 8.0 we used internal duplicate of class
SocketAddress
that was apparently more forgiving in certain corner cases. We switch in 8.0 to usage of public API that is more strict.Testing
The fix was merged to main and verified by customer. Also 8.0 binaries were tested in their lab. See #108334 (comment) for details.
Risk
Low. The fix basically checks for error condition to avoid throwing. It seems like the condition is coming from Darwin kernel where sometime
accept
operation fails to provide remote address.