[jbossts-issues] [JBoss JIRA] Commented: (JBTM-599) Synchronization problem in CacheStore

Misty Stanley-Jones (JIRA) jira-events at lists.jboss.org
Wed Dec 8 21:37:31 EST 2010

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

Misty Stanley-Jones commented on JBTM-599:

Release Note:

Cause: <methodname>remove</methodname> operations increase the number of pending <methodname>remove</methodname> operations. They do not notify the AsyncCache thread when the state of the cache changes to full.

Consequence:  The AsyncStore thread can deplete the qeuue of all pending adds and removes, and then go into a wait. If this is followed by enough removes with no adds, the cache fills and further adds are stalled until the AsyncStore thread wakes up.

Fix: Test the wait condition during remove, and if the cache is full, notify the AsyncStore thread.

Result: The AsyncCache does not stall, and clears the cache properly.

> Synchronization problem in CacheStore
> -------------------------------------
>                 Key: JBTM-599
>                 URL: https://jira.jboss.org/browse/JBTM-599
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Transaction Core
>    Affects Versions: 4.7.0
>            Reporter: Andrew Dinn
>            Assignee: Mark Little
>             Fix For: 4.14.0
> This bug manifests occasionally when running the CachedTest. The AsyncStore thread suspends inside its run method on a (120 sec) timed wait because the cache is not full. When I managed to catch this case in the debugger I found that there were many writer threads (~30) suspended inside addWork in an untimed wait on the overflow lock. So, these writing threads  make  no progress for 120 seconds. The AsyncStore thread does notify the object on which the writers are waiting but there is clearly a window where the writers can go to sleep while the cache is full and not get notified when the AsyncStore thread has emptied it.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list