You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2016/02/24 13:12:18 UTC

[jira] [Assigned] (QPID-7101) Guard CancelledKeyException to deal with the case where the Port is shutdown before the the connection has finally closed

     [ https://issues.apache.org/jira/browse/QPID-7101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall reassigned QPID-7101:
--------------------------------

    Assignee: Keith Wall

> 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
>    Affects Versions: qpid-java-6.0.1
>         Environment: IBM Corporation version: pxa6470sr5-20130619_01 (SR5) OS : Linux version: 3.13.0-36-lowlatency
>            Reporter: Keith Wall
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: qpid-java-6.1
>
>
> 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. The Oracle JDK throws {{ClosedSelectorException}} the IBM JDK {{CancelledKeyException}}.  See QPID-7001.



--
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