Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendPingAsync: Exception when using as root under macOS #33430

Closed
pgrosslicht opened this issue Mar 10, 2020 · 4 comments · Fixed by #35070
Closed

SendPingAsync: Exception when using as root under macOS #33430

pgrosslicht opened this issue Mar 10, 2020 · 4 comments · Fixed by #35070
Labels
area-System.Net bug os-mac-os-x macOS aka OSX tenet-compatibility Incompatibility with previous versions or .NET Framework
Milestone

Comments

@pgrosslicht
Copy link

Hello,

when using SendPingAsync as root on a macOS system, a SocketException is thrown (System.Net.Sockets.SocketException (56): Socket is already connected). If run as a regular user, it works. It also works for root if you use .NET 2.2. This leads me to believe that this behaviour was introduced in this commit c6efaf4. I also tested this on different macOS machines and the outcome was the same, but on a Ubuntu machine it works with sudo as well.

Here is the program I used to reproduce this issue: https://gist.github.com/pgrosslicht/0acf36322247793925dd62692b9202cd.
Here are screenshots running said program with .NET 3.1 with and without sudo and with .NET 2.2 with and without sudo.

NET3 1

NET2 2

Thanks in advance!

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't add an area label to this Issue.

Checkout this page to find out which area owner to ping, or please add exactly one area label to help train me in the future.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Mar 10, 2020
@vcsjones
Copy link
Member

@wfurt

@wfurt wfurt added the os-mac-os-x macOS aka OSX label Mar 10, 2020
@karelz karelz added bug tenet-compatibility Incompatibility with previous versions or .NET Framework and removed untriaged New issue has not been triaged by the area owner labels Mar 12, 2020
@karelz karelz added this to the 5.0 milestone Mar 12, 2020
@karelz
Copy link
Member

karelz commented Mar 12, 2020

Triage: Regression from @wfurt's changes in Linux, they regressed Mac.

@wfurt
Copy link
Member

wfurt commented Mar 12, 2020

I confirmed this is a regression caused by dotnet/corefx#34084. It is not clear if #27996 was ever applicable to OSX. So far I was unable to reproduce it again either on Linux or OSX.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net bug os-mac-os-x macOS aka OSX tenet-compatibility Incompatibility with previous versions or .NET Framework
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants