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

prevent crash on non Linux-based OS #1791

Closed
wants to merge 1 commit into from

Conversation

izemlyanskiy
Copy link

related to #1786
on the latest version of netty-incubator-transport-native-io_uring class IOUring may throw an exception during initializing.
For example on Mac OS Redis connection doesn't work because of this exception https://github.com/netty/netty-incubator-transport-io_uring/blob/main/src/main/java/io/netty/incubator/channel/uring/Native.java#L277

on the latest version of netty-incubator-transport-native-io_uring class `IOUring` may throw an exception during initializing. 
For example on Mac OS Redis connection doesn't work because of this exception https://github.com/netty/netty-incubator-transport-io_uring/blob/main/src/main/java/io/netty/incubator/channel/uring/Native.java#L277
@QIvan
Copy link

QIvan commented Jul 5, 2021

hi @mp911de, sorry to bother you. Could you take a look, please?
at the neighbor issue you told

we intend to pick up the latest io_uring version with our next release

this is, probably, the first issue you would meet, if you develop on Mac.
thank you in advance.

@mp911de
Copy link
Collaborator

mp911de commented Jul 5, 2021

I'm somewhat confused why io_uring specifically causes issues. The native support code looks pretty similar to epoll and kqueue which do not seem to interfere. As a workaround, please do not include io_using when developing on unsupported platforms.

If we want to address the issue we need to make sure that we have a consistent behavior with the other libraries as well.

@QIvan
Copy link

QIvan commented Jul 7, 2021

thanks, @mp911de for your feedback!
To be honest, I was surprised when I first time saw the code for checking the availability for IO_uring, I expected lettuce would catch any exception or even Throwable, but for some reason, it caught only ClassNotFoundException...
Why? During initialization, everything might happen. I know other libraries throw nothing in static blocks, but, in my opinion, we were just lucky so far.
I can make the same adjustment for other providers if you bless =)

@mp911de
Copy link
Collaborator

mp911de commented Jul 8, 2021

I was able to reproduce the issue with version 0.0.7. In version 0.0.8 that issue is fixed and handled properly within netty. So all that is left to do is upgrading to 0.0.8.

@mp911de mp911de closed this Jul 8, 2021
@mp911de mp911de added the for: external-project For an external project and not something we can fix label Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants