You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/11/27 13:36:11 UTC

[jira] [Commented] (AMQ-2191) Incorrect handling of interruptions during commit or rollback of a transaction

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

ASF subversion and git services commented on AMQ-2191:
------------------------------------------------------

Commit 0a12bcb928f151b5ace9a0cffc34ec717b6a8e9c in activemq's branch refs/heads/master from [~gtully]
[ https://git-wip-us.apache.org/repos/asf?p=activemq.git;h=0a12bcb ]

https://issues.apache.org/jira/browse/AMQ-2191 https://issues.apache.org/jira/browse/AMQ-3529 - rework fixes to remove uncertanty from dealing with intettuptedexception. Sync requests will trap interrupts that ocurr while waiting for responses and fail the connection with an interruptedioexception. Interrupts pending before requests will be suppressed, allowing possible clean shutdown. It is not safe to replay openwire ops b/c they are not idempotent, the only safe option is to have a teardown of the broker side state from a close


> Incorrect handling of interruptions during commit or rollback of a transaction
> ------------------------------------------------------------------------------
>
>                 Key: AMQ-2191
>                 URL: https://issues.apache.org/jira/browse/AMQ-2191
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.3.0
>         Environment: Java 1.6.0_02
> Kubuntu Linux  2.6.24-22
> Bitronix Transaction Manager 1.3.2
>            Reporter: Michael Gottschalk
>            Assignee: Gary Tully
>             Fix For: 5.3.1, 5.4.0
>
>         Attachments: ACTIVEMQ-PATCH, activemq_interruption_fix.diff, xa-jms-exception.txt
>
>
> We have a process framework that sends interruptions to threads that should be stopped or paused. Some of these threads interact with ActiveMQ, so interruptions can occur inside ActiveMQ at different points.
> A problem occurs if the interruption is detected in ActiveMQConnection.syncSendPacket during commit or rollback of a transaction. ActiveMQ then throws a JMSException so that it appears to Bitronix as if the XA transaction is in an inconsistent state (see stacktrace in the attached file).
> In our opinion, the interruption should be ignored by ActiveMQ during the critical commit or rollback phase. It is not mandatory that an interruption has an immediate effect. Especially such a non-interruptable step as rollback or commit should be performed even though an interruption occurs.
> I created a patch for the class TransactionContext which, in case of an interruption, resets the interruption state of the thread, retries the syncSendPacket method call and restores the thread's interruption state afterwards. In this manner, no inconsistent state exceptions occur in the transaction manager any longer and interruption is deferred until the commit/rollback has succeeded.



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