-
-
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
Epoll native library does NOT load after upgrade between 4.1.39 and 4.1.40 #9758
Comments
What is the Linux distro and Version ?
… Am 05.11.2019 um 17:53 schrieb ursa ***@***.***>:
Expected behavior
Native epoll support keeps working after upgrade.
Actual behavior
Server apps fail on startup with the following stack trace:
...
Caused by: java.lang.UnsatisfiedLinkError: failed to load the required native library
at io.netty.channel.epoll.Epoll.ensureAvailability(Epoll.java:80)
at io.netty.channel.epoll.EpollEventLoop.<clinit>(EpollEventLoop.java:52)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:142)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:35)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:59)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:104)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:91)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:68)
at com.db.abos.common.api.transport.netty.NettyOsFactory.newGroup(NettyOsFactory.java:66)
at com.db.abos.common.api.transport.netty.ServerWebSocketFactory.<init>(ServerWebSocketFactory.java:91)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)
... 19 common frames omitted
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so: /lib64/libc.so.6: version `GLIBC_2.12' not found (required by /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1086)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:203)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:228)
at io.netty.channel.epoll.Native.<clinit>(Native.java:57)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:39)
... 36 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so: /lib64/libc.so.6: version `GLIBC_2.12' not found (required by /tmp/libnetty_transport_native_epoll_x86_643970988024581631659.so)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:810)
at java.lang.System.load(System.java:1086)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
... 40 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 39 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
... 40 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: netty_transport_native_epoll
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:231)
... 38 common frames omitted
Caused by: java.io.FileNotFoundException: META-INF/native/libnetty_transport_native_epoll.so
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
... 39 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:349)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:136)
... 39 common frames omitted
Suppressed: java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1122)
at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.netty.util.internal.NativeLibraryLoader$1.run(NativeLibraryLoader.java:369)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.NativeLibraryLoader.loadLibraryByHelper(NativeLibraryLoader.java:361)
at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:339)
... 40 common frames omitted
Steps to reproduce
assertNull(Epoll.unavailabilityCause())
Netty version
4.1.39 - epoll works
4.1.43 - epoll does NOT work
JVM version (e.g. java -version)
% java -version
openjdk version "1.8.0_221"
OpenJDK Runtime Environment (Zulu 8.39.0.8-SA-linux64) (build 1.8.0_221-b08)
OpenJDK 64-Bit Server VM (Zulu 8.39.0.8-SA-linux64) (build 25.221-b08, mixed mode)
OS version (e.g. uname -a)
% uname -a
Linux gmafxu43 3.0.101-108.98-default #1 SMP Mon Jul 15 13:58:06 UTC 2019 (262a94d) x86_64 x86_64 x86_64 GNU/Linux
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Updated description |
Can you give the exact maven / gradle dependency you are using? I think you need to depend on the os specific version. |
it would be strange because with version 4.1.39 exactly the same dependencies work pretty fine. |
@ursaj can you show me your libc version ? |
sure, if you tell me, what should I be looking for. I'm not familiar with native libraries... |
Just run ldd-v
… Am 06.11.2019 um 19:18 schrieb ursa ***@***.***>:
sure, if you tell me, what should I be looking for. I'm not familiar with native libraries...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
this version is used on ~250 boxes, so updating it is not an option. |
glibc 2.3 was released in 2002. I think you need to upgrade. If not, you can compile the native portion of netty on box, with the correct linkage. |
@ursaj huh... 2.3 ? That is super strange and I don't think we changed anything in how we build stuff. Can you try to upgrade one version after the other and let me know in which version it exactly broke ? |
Checker:
Output:
|
ok interesting... let me try to find out what changed |
@ursaj can you paste the output of : |
|
hmm that's super strange. We use centos 6 to compile our native epoll transport which uses |
|
a) Maybe there are some logs from build, that could clarify this (new) dependency on GLIBC_2.12 ? |
|
@ursaj Let me try to build 4.1.39.Final on the docker image. That said I am pretty sure it is linked the same way. |
Alright I know what the problem is and I think I have a fix :) Stay tuned. |
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.
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 thanks a lot! |
Expected behavior
Native epoll support keeps working after upgrade.
Actual behavior
Server apps fail on startup with the following stack trace:
Steps to reproduce
Netty version
4.1.39 - epoll works
4.1.40 - epoll does NOT work
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)The text was updated successfully, but these errors were encountered: