-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Remove dependency on GLIBC 2.12 by using syscalls directly #9797
Conversation
Motivation: 394a1b3 introduced a hard dependency on GLIBC 2.12 which was not the case before. This had the effect of not be able to use the native epoll transports on platforms which ship with earlier versions of GLIBC. To make things a backward compatible as possible we should not introduce such changes in a bugfix release. Special thanks to @weissi with all the help to fix this. Modifications: - Use syscalls directly to remove dependency on GLIBC 2.12 - Make code consistent that needs newer GLIBC versions - Adjust scattering read test to only run if recvmmsg syscall is supported - Cleanup pom.xml as some stuff is not needed anymore after using syscalls. Result: Fixes #9758.
/cc @ursaj |
} | ||
return JNI_FALSE; | ||
return JNI_TRUE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of nit suggestion but these methods could be more concise as e.g.
return (syscall(SYS_sendmmsg, -1, NULL, 0, 0) != -1 || errno != ENOSYS) ? JNI_TRUE : JNI_FALSE;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is more readable as it is. So let me keep it
Motivation: 394a1b3 introduced a hard dependency on GLIBC 2.12 which was not the case before. This had the effect of not be able to use the native epoll transports on platforms which ship with earlier versions of GLIBC. To make things a backward compatible as possible we should not introduce such changes in a bugfix release. Special thanks to @weissi with all the help to fix this. Modifications: - Use syscalls directly to remove dependency on GLIBC 2.12 - Make code consistent that needs newer GLIBC versions - Adjust scattering read test to only run if recvmmsg syscall is supported - Cleanup pom.xml as some stuff is not needed anymore after using syscalls. Result: Fixes #9758.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…vmmsg and sendmmsg usage Motivation: #9797 changed the code for recvmmsg and sendmmsg to use the syscalls directly to remvove the dependency on newer GLIBC versions. Unfortunally it made the assumption that the syscall numbers are the same for different architectures, which is not the case. Thanks to @jayv for pointing it out Modifications: Add #if, #elif and #else declarations to ensure we pick the correct syscall number (or not support if if the architecture is not supported atm). Result: Pick the correct syscall number depending on the architecture.
…vmmsg and sendmmsg usage (#9844) Motivation: #9797 changed the code for recvmmsg and sendmmsg to use the syscalls directly to remvove the dependency on newer GLIBC versions. Unfortunally it made the assumption that the syscall numbers are the same for different architectures, which is not the case. Thanks to @jayv for pointing it out Modifications: Add #if, #elif and #else declarations to ensure we pick the correct syscall number (or not support if if the architecture is not supported atm). Result: Pick the correct syscall number depending on the architecture.
…vmmsg and sendmmsg usage (#9844) Motivation: #9797 changed the code for recvmmsg and sendmmsg to use the syscalls directly to remvove the dependency on newer GLIBC versions. Unfortunally it made the assumption that the syscall numbers are the same for different architectures, which is not the case. Thanks to @jayv for pointing it out Modifications: Add #if, #elif and #else declarations to ensure we pick the correct syscall number (or not support if if the architecture is not supported atm). Result: Pick the correct syscall number depending on the architecture.
This is a bug-fix release. One of the important fixes is, that it removes the dependency on a newer glibc version: - Remove dependency on GLIBC 2.12 by using syscalls directly (netty/netty#9797) For more details see the changelog: https://netty.io/news/2019/12/18/4-1-44-Final.html
This is a bug-fix release. One of the important fixes is, that it removes the dependency on a newer glibc version: - Remove dependency on GLIBC 2.12 by using syscalls directly (netty/netty#9797) For more details see the changelog: https://netty.io/news/2019/12/18/4-1-44-Final.html
…vmmsg and sendmmsg usage (netty#9844) Motivation: netty#9797 changed the code for recvmmsg and sendmmsg to use the syscalls directly to remvove the dependency on newer GLIBC versions. Unfortunally it made the assumption that the syscall numbers are the same for different architectures, which is not the case. Thanks to @jayv for pointing it out Modifications: Add #if, #elif and #else declarations to ensure we pick the correct syscall number (or not support if if the architecture is not supported atm). Result: Pick the correct syscall number depending on the architecture.
Motivation:
394a1b3 introduced a hard dependency on GLIBC 2.12 which was not the case before. This had the effect of not be able to use the native epoll transports on platforms which ship with earlier versions of GLIBC.
To make things a backward compatible as possible we should not introduce such changes in a bugfix release.
Special thanks to @weissi with all the help to fix this.
Modifications:
Result:
Fixes #9758.