qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Created] (QPID-7186) CancelledKeyException from the accepting thread during Broker shutdown
Date Wed, 06 Apr 2016 14:06:25 GMT
Keith Wall created QPID-7186:
--------------------------------

             Summary: CancelledKeyException from the accepting thread during Broker shutdown
                 Key: QPID-7186
                 URL: https://issues.apache.org/jira/browse/QPID-7186
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: qpid-java-6.0.1
            Reporter: Keith Wall
            Assignee: Keith Wall
            Priority: Minor
             Fix For: qpid-java-6.0.2, qpid-java-6.1


The following failure occurred during an Apache CI run:

https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-MMS-6.0.x-TestMatrix/lastCompletedBuild/jdk=JDK%201.7%20(latest),label=Ubuntu,profile=java-mms.0-10/artifact/6.0.x/systests/target/surefire-reports/TEST-org.apache.qpid.transport.ProtocolNegotiationTest.testWrongProtocolHeaderSent_BrokerRespondsWithSupportedProtocol.txt

The error occurred during the Broker shutdown.  The SelectorThread had cancelled the key corresponding
to the accepting port, and then failed when iterating the previously returned selector keys
({{SelectorThread.SelectionTask#processSelectionKeys}}) .

We can tell from the logs that no connections existed to the Broker at the point of shutdown,
so the only key registered on the selector must have been the accepting port.

It seems that the Broker must has received a incoming connection to the accepting port around
the time of shutdown and this meant that the selector returned the acceptor as just of the
selected set.  This was then processed after the key was cancelled, causing the exception.

{noformat}
2016-04-05 21:35:48,683         DEBUG [Selector-Port-amqp] o.a.q.s.t.SelectorThread Cancelling
selector on accepting port /0:0:0:0:0:0:0:0:15672 
...
2016-04-05 21:35:48,706         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) ~[na:1.7.0_80]
	at sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:87) ~[na:1.7.0_80]
	at java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:360) ~[na:1.7.0_80]
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.processSelectionKeys(SelectorThread.java:167)
~[qpid-broker-core-6.0.2-SNAPSHOT.jar:6.0.2-SNAPSHOT]
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:306)
~[qpid-broker-core-6.0.2-SNAPSHOT.jar:6.0.2-SNAPSHOT]
	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
~[qpid-broker-core-6.0.2-SNAPSHOT.jar:6.0.2-SNAPSHOT]
	at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:463) ~[qpid-broker-core-6.0.2-SNAPSHOT.jar:6.0.2-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_80]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_80]
	at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_80]

{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message