Update of /cvsroot/sbcl/sbcl/src/code
In directory vz-cvs-3.sog:/tmp/cvs-serv9405/src/code
18.104.22.168: deadlock detection fixes
* The same deadlock may be reported in multiple threads: adjust tests
to account for that.
* CHECK-DEADLOCK/DEADLOCK-CHAIN could signal an error if the deadlock
had disappeared between its detection and building up the chain due
to one of the involved threads unwinding.
To flush out issues like this a bit better, added looping to some
of the deadlock tests.
RCS file: /cvsroot/sbcl/sbcl/src/code/target-thread.lisp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- target-thread.lisp 11 May 2011 19:42:36 -0000 1.142
+++ target-thread.lisp 14 May 2011 09:14:55 -0000 1.143
@@ -443,9 +443,11 @@
(deadlock-chain (thread lock)
(let* ((other-thread (lock-owner lock))
- (other-lock (thread-waiting-for other-thread)))
+ (other-lock (when other-thread
+ (thread-waiting-for other-thread))))
(cond ((not other-thread)
- ;; The deadlock is gone -- maybe someone timed out?
+ ;; The deadlock is gone -- maybe someone unwound
+ ;; from the same deadlock already?
(return-from check-deadlock nil))
;; There's a timeout -- no deadlock.