Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-M1
-
None
Description
To reproduce you can simply run the EchoServer from mina-example and use AprIoAcceptor instead of NioAcceptor. I used the EchoClient from Julien Vermillard's sandbox here: https://svn.apache.org/repos/asf/mina/sandbox/jvermillard/ and used 20 or 30 concurrent connections.
AprIoProcessor.destroy() is called multiple times when an exception is generated in AbstractPollingIoProcessor (RST, etc.) and either epoll or apr doesn't like to remove a closed fd from the pollset. I believe that destroy is called twice because AprIoProcessor.state() returns SessionState.OPEN when the native fd is > 0. I don't believe once open it will ever be 0 again.
I was able to fix the problem by explicitly settion AprSession.descriptor to 0 after the socket was closed although I'm not sure this is the correct solution.