• Bug
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • Lock Manager
  • nadeem
  • Reporter: gbevin
  • October 08, 2008
  • 0
  • Watchers: 2
  • February 02, 2009
  • January 12, 2009

Description

Having two nodes competing on a RRWL with tryLock will only award the lock to the last node that held it. It seems that tryLock never causes a greedy lock to be recalled, unless a node succeeds with a normal lock request, even if nobody is contending anymore.

Comments

Geert Bevin 2008-10-08

Also happens with ReentrantLock … I’m now going to try to rewrite my testcase to use lower-level operations to see if this is a bug at the core lock manager, or in these lock classes.

Geert Bevin 2009-01-09

Seems like the best solution is to simply send out a lock recall if it is greedily held by others, but not wait for it. This will make the tryLock return immediately, but allow later try lock requests to succeed since the lock might already be recalled.

Geert Bevin 2009-01-10

Fixed in revisions 11228 and 11233

Geert Bevin 2009-01-10

Committed as rev 11234 in 2.7 branch

Geert Bevin 2009-01-12

Monkeys failed: http://kong.terracotta.lan/output/archive/trunk/rev11230/cruisecontrol-log-trunk-alltests-rev11230-su10mo0-20090111-1950.log.txt.gz http://kong.terracotta.lan/output/archive/trunk/rev11230/build-archive-trunk-alltests-rev11230-su10mo0-20090111-1950.zip

Geert Bevin 2009-01-12

Bah, forgot to read the revision included in the log files, these failures are from before my latest fixes. Resolving again.

nadeem ghani 2009-01-27

test for this was added and is running without failures, so closing