Unexpected exception in the selector loop

Shay Banon kimchy at gmail.com
Sun Dec 27 09:06:58 EST 2009


I think I know what might have caused this by analyzing what I changed
recently, though I have not fully gone through the netty code to understand
why this might happen.

It seems like this might happen (not all the time) when I close a channel
from within a channel future listener registered when closing another
channel :). Seems like when I don't do that, I don't get the sporadic
cancelled key exception.

I will try and do more tests and see if this is really the case.

Shay

On Sun, Dec 27, 2009 at 12:38 PM, Shay Banon <kimchy at gmail.com> wrote:

> Hi,
>
>   I started to get the following exception, any hint what to do with it?
>
> [netty.channel.socket.nio.NioWorker] Unexpected exception in the selector
> loop.
> java.nio.channels.CancelledKeyException
> at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
> at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69)
>  at
> sun.nio.ch.KQueueSelectorImpl.updateSelectedKeys(KQueueSelectorImpl.java:105)
> at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:74)
>  at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
> at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
>  at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:158)
> at
> org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46)
>  at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  at java.lang.Thread.run(Thread.java:637)
>
> Cheers,
> Shay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20091227/1adae05c/attachment.html 


More information about the netty-users mailing list