You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Alex Rudyy (JIRA)" <ji...@apache.org> on 2017/09/11 10:14:01 UTC

[jira] [Created] (QPID-7909) [Java Broker] CancelledKeyException can be thrown from a selector thread when accepting new connection on Broker shutdown

Alex Rudyy created QPID-7909:
--------------------------------

             Summary: [Java Broker] CancelledKeyException can be thrown from a selector thread when accepting new connection on Broker shutdown
                 Key: QPID-7909
                 URL: https://issues.apache.org/jira/browse/QPID-7909
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: qpid-java-broker-7.0.0
            Reporter: Alex Rudyy
            Priority: Critical


{{CancelledKeyException}} can be reported on broker shutdown when a new incoming connection is about to be accepted. The exception crashes the broker as it is not handled anywhere.

The following thread stack trace is reported into broker logs
{noformat}
2017-09-10 15:54:48,118          ERROR [Selector-Port-amqp] o.a.q.t.u.InternalBrokerHolder Uncaught exception from thread Selector-Port-amqp
java.nio.channels.CancelledKeyException: null
	at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
	at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87)
	at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360)
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:180)
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:319)
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
	at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
{noformat}

The broker log does not contain the logs for selector cancellation in {{SelectorThread#cancelAcceptingSocketAsync}} for amqp port. It does not look like selector was cancelled from Qpid code




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org