-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
zlib and io_uring #40
Comments
Can you show me how you call the code and the full stacktrace ? -2 is a valid error code (stream error) Bye |
these errors only originate when we use this in the pipeline:
code from other side:
apologies, error here is this one:
I'd normally attribute this to an error of ours but it only occurs when we use io_uring - no issues using epoll or nio |
when we remove the checkArgument, there we get the -2 on zlib decompression |
I've done some test a time ago, and it appears that the decoded buffer has multiple nio buffers, so that's why you got the -2 on Zlib cause it can't decompress multiple buffers |
so is this a limitation of zlib? or bug? |
thinking about this some more, im not sure why the issue only appears on io_uring - on epoll and nio no issue. |
Actually I've done some more test. I have a custom fork of BungeeCord https://github.com/SpigotMC/BungeeCord with IOUring and a custom fork of PaperSpigot (https://github.com/PaperMC/Paper) with IOUring on. I just try to launch the bungeecord server with io_uring on and the spigot with io_uring on and it's not working. I got this error from the Bungeecord logs When I launch the spigot server on Epoll, it works. So I don't know why and I'm going to search more things on it, but the zlib compression don't work with IOUring on BungeeCord and Spigot |
Can you provide a reproducer that I can run locally ? |
@AlfieC @HookWoods ping |
OK I will set up that when I'm at home (in 3-4h) |
While CompositeByteBuf exists in netty it only gives us a native address when it just has one component, else it errors. So that cannot be the problem.
|
It sounds like the only variable between working and non-working systems is the io_uring transport, and in this case the error shows up as a corrupted (I guess) zlib stream. It could be that the io_uring transport doesn't set correct read- or write-offsets on the buffers in some cases, and it just happens to get caught by zlib because it sanity checks the data it gets. |
any update on this? |
This seems to still be an issue. |
It's fixed in Netty 4.2.0 (Tested using Beta1) |
sorry to get back to this years later. we fixed it by enabling compression one tick after login |
That is not a solution, thats at most a quirky workaround which just so happens to work for you by accident. |
with said solution we were able to hit 1.1k players on an instance, 3k-ish per bungee |
this issue is fixed in netty 4.2.0, maybe the fix could just be backported here? |
The reason it worked for him is because the first tick usually uses the most amount of packets, that's a per specific production for MINECRAFT, not any other software specifically aswell. |
ah my bad! Was responding via email so thought this was the Bungee issue. apologies, yes, it was a workaround. |
hey,
we have a pretty large codebase so I'll try to pull out the most important parts
we essentially dropped in epoll support whereas before we used nio - no issue there.
we later deployed kernel 5 + io_uring with the io_uring module, and we started to have issues. we compress the network stream data with zlib (mostly implemented native to avoid copying bytebuf)
error flows from here: https://github.com/SpigotMC/BungeeCord/blob/master/native/src/main/c/NativeCompressImpl.cpp#L76
always errors showing -2. I would usually attribute this to a bug on our side, but the issue only surfaces when we put the "proxy" type server on io_uring, as epoll and nio work without issue. not sure what kind of logs you guys need but I can try to provide anything requested.
The text was updated successfully, but these errors were encountered: