From: John Maddock (john_at_[hidden])
Date: 2005-09-08 05:45:42
I've been trying to solve the deadlock problem reported here:
http://lists.boost.org/Archives/boost/2005/08/92307.php but I've simply run
into more and more problems, and just about every operation I've tried will
deadlock if you try hard enough.
THIS IS NOT GOOD.
Applying Roland Swartz's suggested fix everywhere that looked appropriate
initially seemed to fix the issue, but once you move to more complex
situations (both readers and writers) then the deadlocks simply come back
again. At this point I've exhausted my understanding of the problem and the
design of the lock. As an aside: it is *very* hard to implement something
like this correctly: no amount of debugging will ever get you a reliable
system, only a clearly understood design backed up by a solid theoretical
understanding of the implementation method (formal methods anyone?). To be
honest I have to question whether it's even a good idea for this to be in
Boost (no slur intended towards the implementers of that class, it's the
difficulty of the problem that's the issue).
In case anyone wants to pursue this further I'm attaching my current test
case, and the current patches I have to the implementation, however, please
note that neither this test case, nor the current regression tests are
anything like comprehensive, THEY WILL NOT CATCH ALL POSSIBLE PROBLEMS.
Sorry about the capital letters folks, but I suspect we have a "Huston, we
have a problem" moment here :-(
Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk