Skip to content
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

Message lost of locks_running -- may cause deadlock #38

Open
xinhaoyuan opened this issue Oct 10, 2018 · 2 comments
Open

Message lost of locks_running -- may cause deadlock #38

xinhaoyuan opened this issue Oct 10, 2018 · 2 comments

Comments

@xinhaoyuan
Copy link

locks_watcher is notified by

catch locks_watcher ! locks_running,

However, the message could be lost if a locks_server is started after

case whereis(locks_server) of

but the message is sent before the name locks_watcher is registered.

try register(locks_watcher, self()),

@uwiger
Copy link
Owner

uwiger commented Apr 2, 2020

@xinhaoyuan sorry for the long delay, but would you like to inspect the proposed fix?

@xinhaoyuan
Copy link
Author

Hi @uwiger, thanks for asking. The fix looks good and should fix the bug reported.

This bug was found using Morpheus, a concurrency testing tool for Erlang. I am no longer working on the project, but I will try to run the tool on the fixed version and let you know if there are any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants