[jboss-jira] [JBoss JIRA] (JGRP-1679) tryLock with (and without) timeout allows simultaneous concurrent access to not thread-safe data to more then one client

Bela Ban (JIRA) jira-events at lists.jboss.org
Mon Aug 26 08:35:26 EDT 2013


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

Bela Ban commented on JGRP-1679:
--------------------------------

A unique lock-id was added to each ClientLock. It is passed with a grant-lock request and lock-granted / lock-denied responses carry it, too. If a lock response is received whose lock-id differs from the current ClientLock's lock-id, the response will be discarded.

Second issue: invoking a lot of tryLock(timeout) methods with a small timeout, then grant-lock and release-lock requests can pass each other, as they're sent as OOB messages. This was changed and messages are now sent as regular messages, not OOB messages, again. I changed this for RpcLockingTest. The better way to fix RpcLockingTest is to not invoke blocking RPCs while holding a lock, but instead to use OOB sync RPCs.
                
> tryLock with (and without) timeout allows simultaneous concurrent access to not thread-safe data to more then one client
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JGRP-1679
>                 URL: https://issues.jboss.org/browse/JGRP-1679
>             Project: JGroups
>          Issue Type: Bug
>    Affects Versions: 3.2.4, 3.3.4
>         Environment: Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz 
> 8 GB RAM 
> Windows 7 
> JRE 1.6.31
>            Reporter: Architect SoftWeb.ISD
>            Assignee: Bela Ban
>             Fix For: 3.4
>
>         Attachments: lockservice_stability_testcase.jar
>
>
> It looks as it is possible to access a not thread-safe data simultaneously by several clients when tryLock with timeout is used.
> It is reproduced easily with timeouts from 1 to 3 seconds inclusive.
> It is very difficult to reproduce the issue with bigger values of the timeout.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list