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

Remove dependency on GLIBC 2.12 by using syscalls directly #9797

Merged
merged 1 commit into from
Nov 23, 2019

Conversation

normanmaurer
Copy link
Member

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.

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.
@normanmaurer
Copy link
Member Author

/cc @ursaj

}
return JNI_FALSE;
return JNI_TRUE;
}
Copy link
Member

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;

Copy link
Member Author

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

@normanmaurer normanmaurer merged commit 38109b2 into 4.1 Nov 23, 2019
@normanmaurer normanmaurer deleted the glibc_version_fix branch November 23, 2019 20:12
normanmaurer added a commit that referenced this pull request Nov 23, 2019
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.
Copy link
Member

@carl-mastrangelo carl-mastrangelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

normanmaurer added a commit that referenced this pull request Dec 4, 2019
…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.
normanmaurer added a commit that referenced this pull request Dec 5, 2019
…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.
normanmaurer added a commit that referenced this pull request Dec 5, 2019
…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.
bernd added a commit to Graylog2/graylog2-server that referenced this pull request Jan 2, 2020
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
mpfz0r pushed a commit to Graylog2/graylog2-server that referenced this pull request Jan 3, 2020
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
ihanyong pushed a commit to ihanyong/netty that referenced this pull request Jul 31, 2020
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Epoll native library does NOT load after upgrade between 4.1.39 and 4.1.40
3 participants