Netty NetworkInterface.getNetworkInterfaces()已阻止

时间:2018-07-03 12:33:25

标签: java spring netty

我在春季的代码是:

group = SysUtil.isLinux()?new EpollEventLoopGroup():new NioEventLoopGroup();

和代码块在这里,线程无法继续,我使用jstack,线程始终在这里,但是线程状态是可运行的:

"init_context_comm_t0" #14 daemon prio=5 os_prio=0 tid=0x00007f5fdc889800 nid=0x27 in Object.wait() [0x00007f5fd7ffc000]
java.lang.Thread.State: RUNNABLE
at io.netty.util.NetUtil.(NetUtil.java:156)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
locked <0x00000000835e5868> (a java.util.Vector)
locked <0x00000000837abda8> (a java.util.Vector)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
locked <0x0000000083320da8> (a java.lang.Runtime)
at java.lang.System.load(System.java:1086)
at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:214)
at io.netty.channel.epoll.Native.(Native.java:60)
at io.netty.channel.epoll.IovArray.(IovArray.java:57)
at io.netty.channel.epoll.EpollEventLoop.(EpollEventLoop.java:60)
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:106)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:91)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:78)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:59)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:43)
at io.netty.channel.epoll.EpollEventLoopGroup.(EpollEventLoopGroup.java:36)
at com.sunyainfo.sunyacloud.communication.server.CommunicateEndpoint.(CommunicateEndpoint.java:46)
at com.sunyainfo.sunyacloud.communication.server.CommunicateEndpoint.init(CommunicateEndpoint.java:115)
at com.sunyainfo.sunyacloud.mvc.ContextListener$1.run(ContextListener.java:39)
at java.lang.Thread.run(Thread.java:748)

复制步骤 在spring初始化代码中,调用此代码:

group = SysUtil.isLinux()?new EpollEventLoopGroup():new NioEventLoopGroup();

网络版本

4.0.36.Final

JVM版本(例如java -version)

openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)

操作系统版本(例如uname -a)

Linux debian 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

提示:我在docker中运行此代码

1 个答案:

答案 0 :(得分:1)

这可能是一个错误...请在具有完整复制者的netty问题跟踪器中打开一个问题,以便我们看看。另外,您可能要升级netty版本,以排除尚未修复的版本。