You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error handling is too brittle for Windows IpcStreamFactory/IPC PAL #41007
If a Connect Diagnostic Port doesn't explicitly call DisconnectNamedPipe before closing the handle, the error handling in the runtime will erroneously treat this as a generic error rather than a hangup. The if statement currently only marks ERROR_PIPE_NOT_CONNECTED as a hangup, but should also treat ERROR_PIPE_BROKEN as a hangup. The current error path also does not reset the connection, so the cache is still there on subsequent loops through IpcStreamFactory::GetNextAvailableStream which leaves us waiting on handles that no longer are attached to anything.
The fix is simple and twofold: reset connections on the error path & map ERROR_PIPE_BROKEN to the hangup state rather than error state. The PR is incoming.
Activity
josalem commentedon Aug 19, 2020
See dotnet/diagnostics#1420 (comment) for a description of the issue