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

System.Net.Sockets.SocketException (55): No buffer space available #425

Open
jarne opened this issue Nov 3, 2018 · 8 comments
Open

System.Net.Sockets.SocketException (55): No buffer space available #425

jarne opened this issue Nov 3, 2018 · 8 comments
Labels

Comments

@jarne
Copy link

jarne commented Nov 3, 2018

When starting MiNET, it throws the following error:

OS: macOS Mojave
.NET core: 2.1.403

Are you blessed with HW accelerated vectors? Yep!
Operations timed using the system's high-resolution performance counter.
  Timer frequency in ticks per second = 1000000000
  Timer is accurate within 1 nanoseconds
 WARN [?] - No level.dat found at D:\Development\DOES NOT EXIST/level.dat. Creating empty.
 WARN [?] - No level.dat found at D:\Development\DOES NOT EXIST/level.dat. Creating empty.
 WARN [?] - No level.dat found at D:\Development\DOES NOT EXIST/level.dat. Creating empty.
 WARN [?] - We overslept -11ms in thread sleep
ERROR [?] - Error during startup!
System.Net.Sockets.SocketException (55): No buffer space available
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue, Boolean silent)
   at System.Net.Sockets.Socket.SetSocketOption(SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
   at System.Net.Sockets.Socket.set_ReceiveBufferSize(Int32 value)
   at MiNET.MiNetServer.CreateListener() in /Users/jarne/Downloads/MiNET/src/MiNET/MiNET/MiNetServer.cs:line 234
   at MiNET.MiNetServer.StartServer() in /Users/jarne/Downloads/MiNET/src/MiNET/MiNET/MiNetServer.cs:line 195
MiNET running. Press <enter> to stop service.

I'm not able to connect to the server.

@NiclasOlofsson
Copy link
Owner

That's a new one. Have to look into that. I wonder if it is trying to set the socket options, when it really shouldn't do it on any other OS than Windows.

@undrfined
Copy link
Contributor

@NiclasOlofsson it sets ReceiveBufferSize to int.Max before platformId check so that's the problem. Probably should be moved into that if statement.
image

@NiclasOlofsson
Copy link
Owner

Should probably check to see if it can give me a proper max size for the platfom in question.

@Guillaume351
Copy link

Guillaume351 commented Dec 10, 2018

Hello,
I have the same issue on the same OS.
Is there a workaround I could use in the meantime ?
Thanks

EDIT; I moved the lines pointed out by undrfined, seems to work

@tpurtell
Copy link

tpurtell commented Jan 1, 2019

OS X max seems to be 7280*1024 for me.

@mikroskeem
Copy link

OSX does not support DontFragment either (on Catalina atleast)

@NiclasOlofsson
Copy link
Owner

Then i would say OSX is a security risk. It's a pretty common attack vector to framgent messages on UDP. And it's really difficult to spot since the IO won't communicate it outside of the "kernel" sort of.

@kennyvv
Copy link
Collaborator

kennyvv commented Dec 19, 2021

Is this still an issue? Do we need to look into this or do we mark this as won't fix? @NiclasOlofsson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants