Bug 921984

Summary: org.infinispan.lucene.DirectoryOnMultipleCachesTest.verifyIntendedLockCachesUsage fails randomly
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jitka Kozana <jkudrnac>
Component: ClusteringAssignee: Tristan Tarrant <ttarrant>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0, 6.1.1CC: amanukya, jdg-bugs, jkudrnac, myarboro, paul.ferraro, rjanik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Infinispan testsuite
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 918450 Environment:
Last Closed: 2013-09-03 06:25:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 918450    
Bug Blocks:    

Description Jitka Kozana 2013-03-15 10:59:44 UTC
+++ This bug was initially created as a clone of Bug #918450 +++

The test randomly fails (but very often) with the error:

java.lang.AssertionError
	at org.infinispan.lucene.DirectoryOnMultipleCachesTest.verifyIntendedLockCachesUsage(DirectoryOnMultipleCachesTest.java:96)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:715)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:907)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1237)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)

Comment 1 JBoss JIRA Server 2013-05-16 09:39:15 UTC
Pedro Ruivo <pedroruivo2> made a comment on jira ISPN-2896

I think that bug is caused by the removeAsync when the value == 0.

Simplify code:
{code:java}
int refCount = refCountObject.intValue();
newValue = refCount - 1;
locksCache.replace(readLockKey, refCountObject, newValue);
if (newValue == 0) {
  locksCache.withFlags(Flag.IGNORE_RETURN_VALUES).removeAsync(readLockKey);
}
{code}

So, when the assertion is done, the value can be zero or one. In case of zero, we need to check if the key is really removed.

Comment 3 JBoss JIRA Server 2013-08-14 20:34:25 UTC
Sanne Grinovero <sanne+jbossorg> updated the status of jira ISPN-2896 to Closed

Comment 5 Paul Ferraro 2014-05-21 13:30:24 UTC
These issues are specific to the Infinispan testsuite, and either reside in modules that are not used in EAP, or pertain to use cases that are not supported in EAP.  Setting resolution to WONTFIX.