On Wed, 14 May 2008 07:13:53 +0900, Geoff Cadien <[EMAIL PROTECTED]> wrote:

On Mon, May 12, 2008 at 12:57 PM, Geoff Cadien <[EMAIL PROTECTED]> wrote:

Wondering if anyone else is successfully using MINA+APR.  I just tried
testing with the echoserver example (just replaced NioSocketAcceptor with
AprSocketAcceptor) and the VM crashes when making more than a couple
concurrent connections.
I'm hoping I've simply done something stupid and someone with some more
experience using the apr-transport could point me in right direction.

Specifics:

[EMAIL PROTECTED]:~$ uname -a
Linux jellikit 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
GNU/Linux

[EMAIL PROTECTED]:~$ java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

tomcat-native-1.1.13

apr-1.2.11

MINA trunk


Well I've discovered what is causing this problem (sort of).
AprIoProcessor.destroy is being called twice.  AprIoProcessor.destroy
removes the fd from the pollset and then closes it.  Either epoll or apr
don't like trying to remove a closed fd from the pollset. This is happening because in my small test using the EchoServer Session.close is being called
from exceptionCaught, which causes destroy to be called, and then
AprIoProcessor schedules the session for removal after firing
exceptionCaught.

My question is this a MINA bug, or an application bug, e.g. session.close()
should only be called if (!session.isClosing()) ?

It's a MINA bug. If you have a reproduceable example application, please file a JIRA issue and attach it so we can test it and fix it. :)

Thanks!
--
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to