-
Notifications
You must be signed in to change notification settings - Fork 4
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
Using multiple threads results in deadlock of the hisparc-update (updatehistograms job) #242
Comments
Does it also fail when using
|
No, unfortunately it does work if |
Ah, That is unfortunate! 😉 |
Darn. Can you be a bit more specific on the symptoms? |
ATM there are no |
I turned on publicdb/publicdb/histograms/jobs.py Line 206 in cd33a6a
All workers (12!) finish event histrogram tasks and at some point just seem to wait for new work or waiting for each other to finish. (Yikes!) This will probably not be easy to debug. I switch back to |
I can unfortunately reproduce a There is a script EDIT: This may or may not cause the deadlock in the actual histograms job, but at least it proves that a deadlock at the CPython level (not our bug) is a real possibility. |
It may not even be the above deadlock, but a much more common cpython bug: https://bugs.python.org/issue6721 . Apparently logging + multiprocessing causes frequent deadlocks. Due to the a process being This is fixed in python>=3.7.1 I'm not going to spend anymore time on this. I'll have a look at the python3 work. |
Thanks a lot @tomkooij! |
This should be fixed by #283, since we update to a newer Python version (i.e. ≥3.7.1). Would we need to reenable some setting which is currently turned off? |
After the update, |
Yes |
If we set
USE_MULTIPROCESSING = True
in settings.py, the publicdb crashes. Unfortunately debugging is hard because of the not so useful error traceback.The text was updated successfully, but these errors were encountered: