netty5/transport-native-epoll/src/main/java/io/netty/channel/epoll
Scott Mitchell ce241bd11e Epoll flush/writabilityChange deadlock
Motivation:
b215794de3 recently introduced a change in behavior where writeSpinCount provided a limit for how many write operations were attempted per flush operation. However when the write quantum was meet the selector write flag was not cleared, and the channel unsafe flush0 method has an optimization which prematurely exits if the write flag is set. This may lead to no write progress being made under the following scenario:
- flush is called, but the socket can't accept all data, we set the write flag
- the selector wakes us up because the socket is writable, we write data and use the writeSpinCount quantum
- we then schedule a flush() on the EventLoop to execute later, however it the flush0 optimization prematurely exits because the write flag is still set

In this scenario the socket is still writable so the EventLoop may never notify us that the socket is writable, and therefore we may never attempt to flush data to the OS.

Modifications:
- When the writeSpinCount quantum is exceeded we should clear the selector write flag

Result:
Fixes https://github.com/netty/netty/issues/7729
2018-02-20 11:40:58 +01:00
..
AbstractEpollChannel.java Epoll flush/writabilityChange deadlock 2018-02-20 11:40:58 +01:00
AbstractEpollServerChannel.java Fix assertion error when closing / shutdown native channel and SO_LINGER is set. 2017-09-18 14:46:37 -07:00
AbstractEpollStreamChannel.java Epoll flush/writabilityChange deadlock 2018-02-20 11:40:58 +01:00
Epoll.java Include more detail why Unsafe is not available 2017-08-29 22:02:06 +02:00
EpollChannelConfig.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
EpollChannelOption.java Add TCP_FASTOPEN_CONNECT epoll option 2017-10-29 13:42:15 +01:00
EpollDatagramChannel.java Fix assertion error when closing / shutdown native channel and SO_LINGER is set. 2017-09-18 14:46:37 -07:00
EpollDatagramChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
EpollDomainSocketChannel.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
EpollDomainSocketChannelConfig.java [#3806] Setting WRITE_BUFFER_LOW_WATER_MARK before WRITE_BUFFER_HIGH_WATER_MARK results in an internal Exception 2016-03-31 13:44:44 +02:00
EpollEventArray.java Faster event processing when epoll transport is used 2015-02-07 08:22:46 +01:00
EpollEventLoop.java Unify KQueue and Epoll wait timeout approach 2017-08-18 13:09:02 -07:00
EpollEventLoopGroup.java Unify {Epoll,KQueue}EventLoopGroup initialization. 2017-07-24 20:14:54 +02:00
EpollMode.java Allow to change epoll mode 2015-02-04 21:37:34 +01:00
EpollRecvByteAllocatorHandle.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
EpollRecvByteAllocatorStreamingHandle.java EpollRecvByteAllocatorHandle doesn't inform delegate of more data 2017-02-13 17:42:24 -08:00
EpollServerChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
EpollServerDomainSocketChannel.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
EpollServerSocketChannel.java Correctly handle connect/disconnect in EpollDatagramChannel / KQueueDatagramChannel 2017-08-04 09:22:53 +02:00
EpollServerSocketChannelConfig.java Add support for IP_TRANSPARENT socket option 2017-06-12 08:03:39 +02:00
EpollSocketChannel.java Correctly handle connect/disconnect in EpollDatagramChannel / KQueueDatagramChannel 2017-08-04 09:22:53 +02:00
EpollSocketChannelConfig.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
EpollTcpInfo.java Correctly handle unsigned int values returned from TCP_INFO 2017-07-25 16:18:52 +02:00
LinuxSocket.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
Native.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
NativeDatagramPacketArray.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
NativeStaticallyReferencedJniMethods.java Native EPOLL Library Allows Shading 2016-02-03 14:40:28 -08:00
package-info.java Introduce a native transport for linux using epoll ET 2014-02-15 22:44:56 +01:00
TcpMd5Util.java New native transport for kqueue 2017-05-03 09:53:22 -07:00