Le 11/10/14 21:06, Hidden a écrit :
> Hello,
>
> we’ve recently updated to MINA 2.0.8. Since then we’ve been getting the 
> following exception every few minutes:
> java.nio.channels.CancelledKeyException
>     at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
>     at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77)
>     at 
> org.apache.mina.transport.socket.nio.NioProcessor.setInterestedInWrite(NioProcessor.java:287)
>     at 
> org.apache.mina.transport.socket.nio.NioProcessor.setInterestedInWrite(NioProcessor.java:45)
>     at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.flushNow(AbstractPollingIoProcessor.java:880)
>     at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.flush(AbstractPollingIoProcessor.java:778)
>     at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.access$700(AbstractPollingIoProcessor.java:67)
>     at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1126)
>     at 
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
>     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>     at java.lang.Thread.run(Thread.java:745)
>
> I don’t know where exactly it comes from, but it’s pretty annoying because it 
> spams the log. It didn’t occur with MINA 2.0.7. The application is a game 
> server communicating via TCP, with about 2000 concurrent clients.

This is due to an operation done on a close SelectionKey. This is not
your fault, it's because we aren't checking the key status before
applying a flag on it. I have fixed it in trunk, so it should not bother
you in MINA 2.0.9.

Can you fill a JIRA with teh description of the problem, so that it
appears in the "fixed issue" of the next release ?

Thanks for the report !

PS : we will probably cut a new release quite soon.

Reply via email to