SocketIoProcessor halts if channel is closed while flushing.
------------------------------------------------------------
Key: DIRMINA-83
URL: http://issues.apache.org/jira/browse/DIRMINA-83
Project: Directory MINA
Type: Bug
Versions: 0.7.3
Reporter: Trustin Lee
Assigned to: Trustin Lee
Fix For: 0.7.4
>From Rodrigo Kumpera's report:
Great work with mina, it do makes writting nio servers easy. I´m
writing a filtering server and have the following scenario:
1-incoming connections, using ServiceRegistry with IoHandler.
2-filtering is done in a separate pool (using doug lea's
util.concurrent package)
3-fowarding the result to another server, using SocketIoProcessor and
IoThreadPoolFilter.
So fair I´ve been able to fine tune the thread pool used by the
ServiceRegistry (1).
My problem is with (2) and (3), I want to have a single thread pool to
be shared by the 3 stages of the server.
With the filtering stage I´m thinking about playing with
IoThreadPoolFilter implementation to use util.concurrent and expose
it's interface.
My problem when using a thread pool with the last stage, when
connecting to foreign hosts, is that it throws the following exception
under moderate load:
java.nio.channels.CancelledKeyException
at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:59)
at org.apache.mina.io.socket.SocketIoProcessor.flush(SocketIoProcessor.j
ava:511)
at org.apache.mina.io.socket.SocketIoProcessor.flushSessions(SocketIoPro
cessor.java:422)
at org.apache.mina.io.socket.SocketIoProcessor.access$300(SocketIoProces
sor.java:41)
at org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProces
sor.java:546)
I tried to use the same IoThreadPoolFilter with an instance of
SocketIoProcessor and ServiceRegistry, but it doesn´t seen to work,
the server halts and don't make any progress.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira