You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/08/19 12:46:46 UTC

[jira] [Commented] (QPID-6672) Message dispatching after dispatcher close can cause thread to terminate with IllegalStateException

    [ https://issues.apache.org/jira/browse/QPID-6672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702843#comment-14702843 ] 

ASF subversion and git services commented on QPID-6672:
-------------------------------------------------------

Commit 1696553 from orudyy@apache.org in branch 'java/trunk'
[ https://svn.apache.org/r1696553 ]

QPID-6672: [Java Client] Message dispatching after dispatcher close can cause thread to terminate with IllegalStateException.

work by Lorenz Quack <qu...@gmail.com>

> Message dispatching after dispatcher close can cause thread to terminate with IllegalStateException
> ---------------------------------------------------------------------------------------------------
>
>                 Key: QPID-6672
>                 URL: https://issues.apache.org/jira/browse/QPID-6672
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>            Reporter: Keith Wall
>            Priority: Minor
>         Attachments: 0001-QPID-6672-Java-Client-Message-dispatching-after-disp.patch, 0001-QPID-6672-Java-Client-Message-dispatching-after-disp_v2.patch, 0001-QPID-6672-Java-Client-Message-dispatching-after-disp_v3.patch, 0001-QPID-6672-Java-Client-Message-dispatching-after-disp_v4.patch, 0001-QPID-6672-Java-Client-Message-dispatching-after-disp_v4.patch, TEST-org.apache.qpid.test.unit.transacted.TransactionTimeoutTest.testConsumerIdleRollback.txt
>
>
> There is a race between the dispatcher thread and another thread closing a session.  In the unlucky case, the dispatcher thread can die with an ISE as below.
> The issue appears to be that the Dispatcher#close method does not await the shutdown for the dispatcher before returning, so the Dispatcher may run on for another iteration whilst the dispatcher reference has been nulled.
> This appears to be a longstanding issue (the fixme goes back to 2007) and is showing up now owing to r1693225, which makes uncaught exceptions fail the test.
> {noformat}
> 2015-07-29 18:16:37,498         ERROR [Dispatcher-4-Conn-32] o.a.q.t.LoggingUncaughtExceptionHandler Uncaught exception in thread "Dispatcher-4-Conn-32"
> java.lang.IllegalStateException: dispatcher is not started
> 	at org.apache.qpid.client.AMQSession.dispatch(AMQSession.java:3267) ~[qpid-client-6.0.0-SNAPSHOT.jar:na]
> 	at org.apache.qpid.client.message.UnprocessedMessage.dispatch(UnprocessedMessage.java:54) ~[qpid-client-6.0.0-SNAPSHOT.jar:na]
> 	at org.apache.qpid.client.AMQSession$Dispatcher.run(AMQSession.java:3408) ~[qpid-client-6.0.0-SNAPSHOT.jar:na]
> 	at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_67]
> {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