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
Excessive exceptions in NamedPipeClientStream on Linux when connecting to a non-existent target #117718
When using NamedPipeClientStream on Linux to connect to a non-existent target, the .NET runtime continuously throws SocketException internally, which severely impacts performance.
Reproduction Steps
The issue can be reproduced with the following simple code:
When running the above code on a Linux system, you will notice that AppDomain.CurrentDomain.FirstChanceException is triggered excessively, and the console is flooded with output.
Expected behavior
I am not sure. But at least, it should not throw exceptions at a high frequency.
Actual behavior
We can find the AppDomain.CurrentDomain.FirstChanceException is triggered excessively. The console output is: FirstChanceException: System.Net.Sockets.SocketException Cannot assign requested address /tmp/CoreFxPipe_DoNotExistFoo
Activity
dotnet-policy-service commentedon Jul 16, 2025
Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.
Avoid SocketException flood in NamedPipeClientStream on Unix
Avoid SocketException flood in NamedPipeClientStream on Unix (#125872)