Keith Wall created QPID-7101:
--------------------------------

             Summary: Guard CancelledKeyException to deal with the case where 
the Port is shutdown before the the connection has finally closed
                 Key: QPID-7101
                 URL: https://issues.apache.org/jira/browse/QPID-7101
             Project: Qpid
          Issue Type: Bug
         Environment: IBM Corporation version: pxa6470sr5-20130619_01 (SR5) OS 
: Linux version: 3.13.0-36-lowlatency
            Reporter: Keith Wall
            Priority: Minor


As demonstrated by the failure of the test 
ProducerFlowControlTest.testFlowControlOnCapacityResumeEqual during Broker 
shutdown,  if the port is shutdown occurs before a connection is finally 
closed, there is a chance that a 
{{CancelledKeyException}} may occur.  This causes the Broker to terminate 
abnormally.

As this situation can only currently occur when the Broker is being shutdown, 
the the user impact is negligible.

{noformat}
Thread terminated due to uncaught 
exceptionjava.nio.channels.CancelledKeyException
        at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
        at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:82)
        at 
java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:202)
        at 
java.nio.channels.SelectableChannel.register(SelectableChannel.java:277)
        at 
org.apache.qpid.server.transport.SelectorThread.unregisterConnection(SelectorThread.java:512)
        at 
org.apache.qpid.server.transport.SelectorThread.removeConnection(SelectorThread.java:591)
        at 
org.apache.qpid.server.transport.NetworkConnectionScheduler.removeConnection(NetworkConnectionScheduler.java:194)
        at 
org.apache.qpid.server.transport.NonBlockingConnection.shutdown(NonBlockingConnection.java:377)
        at 
org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:305)
        at 
org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:108)
        at 
org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:505)
        at 
org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:338)
        at 
org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:87)
        at 
org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:463)
        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:781)
{noformat}


Test failure was:

https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-Test-IBMJDK1.7/lastCompletedBuild/artifact/systests/target/surefire-reports/java-mms.0-10/TEST-org.apache.qpid.server.queue.ProducerFlowControlTest.testFlowControlOnCapacityResumeEqual.txt/*view*/

It appears that there is a behavioural difference between the IBM and Oracle 
JDK.  See QPID-7001.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to