Open InfoSec812 opened 7 years ago
would you mind to set a break point in PortUnreachableException and see why there is no such message ?
PortUnreachableException has an available empty constructor which is being used by the underlying Netty library... Here's the call stack which leads to the Exception being created:
"vert.x-eventloop-thread-1@1858" prio=5 tid=0x14 nid=NA runnable
java.lang.Thread.State: RUNNABLE
at java.net.PortUnreachableException.<init>(PortUnreachableException.java:51)
at sun.nio.ch.DatagramChannelImpl.receive0(DatagramChannelImpl.java:-1)
at sun.nio.ch.DatagramChannelImpl.receiveIntoNativeBuffer(DatagramChannelImpl.java:414)
at sun.nio.ch.DatagramChannelImpl.receive(DatagramChannelImpl.java:392)
at sun.nio.ch.DatagramChannelImpl.receive(DatagramChannelImpl.java:345)
- locked <0x868> (a java.lang.Object)
at io.netty.channel.socket.nio.NioDatagramChannel.doReadMessages(NioDatagramChannel.java:248)
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(AbstractNioMessageChannel.java:75)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:610)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:465)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at java.lang.Thread.run(Thread.java:745)
So, this appears to be a JDK or a Netty problem, not a Vert.x problem.
It might be a good idea for Vert.x to catch this and rethrow this with a proper detail message though.
@InfoSec812 it would be more appropriate to do it in Netty imho and reference it here.
Created https://github.com/netty/netty/issues/6179 to track in the Netty project.
thanks @InfoSec812
Got word back from Norman Mauer @normanmaurer that they will be updating https://github.com/netty/netty to catch and re-throw the exception because the problem is in the JavaSE standard lib.
@InfoSec812 great
Response from Norman was that they WILL be implementing a catch-rethrow for this condition and Normal has also raised a PR with OpenJDK to resolved this at that level as well.
@InfoSec812 have you checked if that's fixed in Netty ? we upgraded to version 4.1.8.Final in master
@vietj not part of netty 4.1.8.Final
Example: