[jboss-user] [JBossCache] - Sometimes aquired locks are not released
jacek187
do-not-reply at jboss.com
Thu Aug 23 10:06:07 EDT 2007
Hi
I'm found, that sometimes PojoCache never releases aquired locks! (v 1.4.1 SP4)
Probably this situation occurs, when transactions are rolled back, but I'm not sure. This is very hard to see this exception in real systems, but when ocurs - whole JVM must be restarted :(. On my systems it occurs until now 5 times and always under heavy load.
Main loop looks like:
| 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);
| }
|
Generally after checkpoint line number of helds locks is 0, but sometimes (very, very rarely) number of locks is greater than 0!!!! If this occurs, some node is locked and nobody can read/write this node - only stop/start treecache can help.
Does anybody else has this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077353#4077353
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077353
More information about the jboss-user
mailing list