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

Architect SoftWeb.ISD (JIRA) jira-events at lists.jboss.org
Fri Aug 16 12:46:26 EDT 2013


     [ https://issues.jboss.org/browse/JGRP-1679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Architect SoftWeb.ISD updated JGRP-1679:
----------------------------------------

    Steps to Reproduce: 
1).Start some amount of threads.
2).Each thread simultaneously with others obtains lock through LockService#getLock then performs tryLock with timeout. For example with timeout equal to 1 second.
3).After successful lock the thread tries to increment an accessible by all threads counter.
4).Thread sleeps for some time. For example for 100ms.
5).Thread decrements the counter.
6).Thread performs unlock.
7).Each thread works during some time.

Problem: in normal case the counter should have value 0 right after successful tryLock but sometimes it has value 1 meaning that some other thread modifies the counter at the same time.

  was:
1).Start some amount of threads.
2).Each thread simultaneously with others obtains lock through LockService#getLock then performs tryLock with timeout. For example with timeout equal to 1 second.
3).After successful lock the thread tries to increment an accessible by all threads counter.
4).Thread sleeps for some time. For example for 100ms.
5).Thread decrements the counter.
4).Thread performs unlock.
5).Each thread works during some time.

Problem: in normal case the counter should have value 0 right after successful tryLock but sometimes it has value 1 meaning that some other thread modifies the counter at the same time.


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