Possible network issue

Alan Bateman Alan.Bateman at oracle.com
Tue Nov 7 16:32:49 UTC 2023


On 07/11/2023 13:28, Robert Engels wrote:
> I suspect that what is happening is that the JVM gets the epoll notification that the socket is writable but by the time the writer runs the network buffers have been exhausted.
>
> This should be an expected condition and seems like a JDK bug introduced with VT support. I checked earlier JDK releases (jdk15) and the sync -> non blocking code was not present in SocketOutputStream.java
I don't think this is specific to virtual threads as we're seeing it 
elsewhere too. If there is no space in the socket write buffer then 
EAGAIN/EWOULDBLOCK is handled.  The intermittent ENOBUFS, which we're 
only seen on macos-aarch64 when under load, is hard to explain. We've 
had also some intermittent ENOMEM when joining multicast groups, also 
not specific to virtual threads.

Your mail said you can duplicate this readily. It would be useful if 
could capture the output of `netstat -nm` at around the time that this 
happens so see if this is a real resource exhaustion issue or not.

-Alan




More information about the loom-dev mailing list