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] [Updated] (QPID-6672) Message dispatching after dispatcher close can cause thread to terminate with IllegalStateException
Date Fri, 31 Jul 2015 11:37:04 GMT

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

Keith Wall updated QPID-6672:
-----------------------------
    Description: 
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}



  was:
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 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}




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


Mime
View raw message