Dan Berindei created ISPN-5524:
----------------------------------
Summary: Race condition in SemaphoreCompletionService.executeFront()
Key: ISPN-5524
URL:
https://issues.jboss.org/browse/ISPN-5524
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 8.0.0.Alpha1, 7.2.2.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Blocker
Fix For: 8.0.0.Alpha2, 7.2.3.Final
If two threads call {{executeFront()}} at the same time, it's possible that none of
them executes any task, although there are permits available, and one of the threads just
added a task in the queue. This scenario causes random initial state transfer timeouts in
the testsuite:
# T1: continueTaskInBackground(): queue = empty, permits = 0
# T1: backgroundTaskFinished()
# T1: = semaphore.release(): queue = empty, permits = 1
# T1: = executeFront()
# T1: == semaphore.acquire() -> true: queue = empty, permits = 0
# T2: == queue.poll() -> null
# T2: submit(task)
# T2: = executeFront()
# T2: == semaphore.acquire() -> false
# T2: return without executing any task
# T1: return without executing any task
Failure example:
http://ci.infinispan.org/viewLog.html?buildId=27153&tab=buildResultsD...
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)