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

Remove dispatcher deadlock for distributed LDA #1817

Merged
merged 5 commits into from
Jan 18, 2018

Conversation

darindf
Copy link
Contributor

@darindf darindf commented Dec 26, 2017

Dead lock is possible when after a worker receives a job from the dispatcher but fails to calls the dispatcher processJob (i.e. machine died, worker process died). In this case the dispatcher is stuck in a infinite loop checking if the number of jobs done meets the number of jobs received.

Added call back mechanism within this loop for the dispatcher to check aliveness of each worker. If worker is not reachable, then an exception is thrown back (exception from Pyro4) so that LdaModel function can fail, thus removing the deadlock condition.

@darindf darindf changed the title Remove deadlock Remove dispatcher deadlock Dec 26, 2017
@menshikh-iv
Copy link
Contributor

Thanks for PR @darindf,

I want to reproduce deadlock, can you write a plan "how to reproduce deadlock" here (I understand your message, but want more formal description)

And about the Pyro4 exception, as I understand, worker.ping should raise it (if a worker is unreachable), but what happens next in the master process?

@darindf
Copy link
Contributor Author

darindf commented Dec 27, 2017 via email

@menshikh-iv menshikh-iv changed the title Remove dispatcher deadlock Remove dispatcher deadlock for distributed LDA Jan 18, 2018
@menshikh-iv
Copy link
Contributor

Big thanks @darindf!

@menshikh-iv menshikh-iv merged commit 74dae4d into piskvorky:develop Jan 18, 2018
sj29-innovate pushed a commit to sj29-innovate/gensim that referenced this pull request Feb 21, 2018
* Updated to 3.1.i1 version for fix 1771

* Remove suprious print statement

* Fixed variable not used error
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

Successfully merging this pull request may close these issues.

2 participants