[jbossts-issues] [JBoss JIRA] (JBTM-2725) Race condition in ControlWrapper

Tomasz Adamski (JIRA) issues at jboss.org
Thu Aug 11 18:00:02 EDT 2016


    [ https://issues.jboss.org/browse/JBTM-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277582#comment-13277582 ] 

Tomasz Adamski edited comment on JBTM-2725 at 8/11/16 5:59 PM:
---------------------------------------------------------------

Hey, 
I usually edit the description after creating JIRA - it is already here ;)

Ehh, those errors are intermittent and I hoped this would be the last fix to stop them but unfortunately got another one even with synchronized block - I'm looking at the issue further :/

OK - there is lot of ControlWrappers created so synchronized on it's rollback method was not effective. I have synchronized the code on the ControlImple object which (to my understanding) is shared during the whole transaction. After this change the error does not occur.


was (Author: tomekadamski):
Hey, 
I usually edit the description after creating JIRA - it is already here ;)

Ehh, those errors are intermittent and I hoped this would be the last fix to stop them but unfortunately got another one even with synchronized block - I'm looking at the issue further :/

> Race condition in ControlWrapper
> --------------------------------
>
>                 Key: JBTM-2725
>                 URL: https://issues.jboss.org/browse/JBTM-2725
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: JTS
>    Affects Versions: 5.3.3.Final
>            Reporter: Tomasz Adamski
>            Assignee: Tomasz Adamski
>
> I have encountered another problem during timeout induced rollback scenario. When the thread rolls back the transaction immediately after the reaper they both end in ControlWrapper#rollback method. This should be synchronized: if it is not both threads may call TransactionImple#rollback method which is not expected and leads to IllegalStateException error. In synchronized scenario second thread in ControlWrapper#rollback method see that the TransactionImple has already been disassociated with the thread and throws TRANSACTION_ROLLEDBACK exception which is expected.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbossts-issues mailing list