Open sunnhas opened 6 years ago
We are aware of this deadlock, which seems to be the same mentioned in #16 and #14. I have tried your example in the aggregation-policy branch (which contains some fixes of other bugs) but it also deadlocks there. We still need to fix it. A dirty trick I use in some of my example is to put some programmed delays (time.Sleep(...)
). to reduce the likelihood of the problem.
PS. thanks for reporting the bug!
I have committed a partial, non-optimal fix. It is still not 100% ok, but I have identified a source of the problem (circular locks on tuples and waiting clients). Hope it helps for the project.
Your test case still deadlocks but less frequently. We will continue working on this.
Problem
The tuple spaces seems to be deadlocking by using very simple
Get
/Put
requests (see the attached go program). The following test script has been checked for deadlocks in Spin and it shouldn't deadlock.Possible solution?
By looking into the library, it seems to something with locking/unlocking the WaitingClients. By changning when it's locked and unlocked on both
Get
andPut
seems be a simple fix, but it makes the application slower.Scripts