-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application *locks* has stopped on double write-lock #19
Comments
Could you try the PR above ( #20 )? I added a test case, which did fail before this fix. |
It doesn't crash any more, but it hangs forever on both sides when I am trying to acquire write lock. |
It's not a question of the deadlock resolution algorithm, but rather of the lock upgrade semantics. Specifically, the locks_server handles the trivial case of upgrade when there's one read lock, but when there are several read locks, it can't differentiate between agents that want nothing more than a read lock and agents that are holding a read lock but hoping to upgrade. |
I'm at a Halloween party, so probably not sober enough to tackle the issue right now, nor would it likely be socially acceptable. ;-) If contribs are offered, I'll gratefully review them. Otherwise, I'll take a look at this later. |
Another problem is that the test case needs to verify that the two write lock requests reach different results (currently, they both time out, which is wrong). |
I've pushed some fixes to the uw-lock_upgrade3 branch. They seem to fix the problem. Could you try to verify at your end? |
It works now, first actor obtains write lock immediately after second tries to acquire write lock. |
Thanks! I've merged PR #20 into master. |
I have two actors which works approximately in the same time. Each of them begins transaction. Each of them acquires
read
lock on the sameoid()
. Then first tries to upgrade read lock to write lock. Second does the same and application crashes immediately:Logs of the first actor:
Logs of the second actor:
I am new to locks so I am trying to learn how it works. In some sense I need lock upgrade functionality, that is why I was curious how it works. Maybe I miss something and what I did goes against very basics of what locks should do.
The text was updated successfully, but these errors were encountered: