[jboss-jira] [JBoss JIRA] Created: (JBCACHE-1168) Sometimes aquired locks are not released

Jacek Halat (JIRA) jira-events at lists.jboss.org
Thu Aug 23 10:18:18 EDT 2007


Sometimes aquired locks are not released
----------------------------------------

                 Key: JBCACHE-1168
                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1168
             Project: JBoss Cache
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: PojoCache
    Affects Versions: 1.4.1.SP4
         Environment: Windows XP, jrockit90_150_06 
Solaris 10
            Reporter: Jacek Halat
         Assigned To: Jason T. Greene
         Attachments: TransactionStormTest.java

Sometimes under heavy load acquired locks are not released - node is locked forever. Only what can we do is stop/start cache.
Main loop:
		while (true) {
			for (int x = 0; x < 2; x++) {
				WorkThread t = new WorkThread(x == 1);
				threads.add(t);
				t.start();
			}
			for (WorkThread separateThread : threads) {
				separateThread.join();
				if (separateThread.getException() != null) {
					//separateThread.getException().getMessage();
				}
			}
			int locksNum = getNumberOfLocksHeld();
//			System.out.println("Locks="+locksNum);
			// checkpoint
			if (cache.getNumberOfLocksHeld()>0){
				System.out.println("ERROR, locks="+locksNum);
				doDomethingOnCache(1);
			}
			assertEquals(0, locksNum);
		}


Exception - after //checkpoint line numberOfLocks is grater than 0!

JUnit is provided to this issue, but this error is nondeterministic - sometimes fails after 5 seconds and another time after 20 minutes. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list