Open peti opened 9 years ago
I also ran into this one.
Reproduced on the Stackage build server with concurrent-extra-7.0.12 using ghc-8.4.1.
ReadWriteLock:
test1: [OK]
test2: [OK]
stressTest: [Failed]
Test Cases Total
Passed 29 29
Failed 1 1
Total 30 30
I don't have an idea yet why the stressTest for RWLocks is failing. Maybe the timeout of 500 * a_moment
(2.5s) is too small.
In any case, I'm not happy with the implementation of RWLock
. I think we can simplify the implementation by replacing the three MVars with some TVars. You typically loose fairness when doing that which is undesirable. However we already don't have fairness because we have a racy implementation. We race here, here and here.
@roelvandijk what do you think about switching to STM?
@roelvandijk any progress on this ticket? I'm also getting this failure.
Citing from http://hydra.cryp.to/build/1114863/nixlog/1/raw: