-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
pathos.pools.ProcessPool deadlock/hang on exceptions #266
Comments
Thank god after wasting tons of time here, this threads help me target on the issue. I found it's really hard to track the trace after applying multiprocessing libs in python. Good luck to all of users. |
I'm not experiencing the same thing, but I wonder if this has anything to do with a version mismatch for In the past, I tested older minor versions of Python with Let me know if the above applies. |
Hi @EvanMcKerns, thank's for the reply. I'm afraid I don't completely follow, but if it helps here's the versions I am using:
Also tried a couple of fresh conda envs with both 3.10.8 and 3.10.11, sadly both experience the same problem. |
@oliver-s-lee: I'm not experiencing this. Are you saying that you experience the same issue with python 3.10.8 and 3.10.11? I don't. I'd like to be able to reproduce your environment and the error you are experiencing. If I do a fresh VM check-out on a mac VM, of the versions you specify, I don't see anything like what you are reporting. However, it's best if you update your python to at least 3.10.8, which was the python that the latest release of python |
Hi Mike @mmckerns, yes I experience the same problem with python version 3.10.8, 3.10.11 and 3.10.6. I am on a linux machine (Linux Mint 21.1 Cinnamon) however, I wonder if that is where the difference is coming from? if you need any other system information I can happily supply. |
Hi there, thanks for the nice code!
I'm encountering a problem where my scripts will hang indefinitely on close if an exception is raised after a ProcessPool has been created (even if the exception itself is handled in the body of the program, and even if the pool is not being used at the time of the exception). The script can only be stopped by using ctrl+c, which gives this monster stacktrace:
Stack Trace
The problem is challenging to recreate exactly, but it can be at least partially recreated by doing the following at the console:
Stack Trace
In this latter example you'll notice that the pool has not even been given any work to do yet. My machine does not have 20 CPUs available, but the problem appears to be at least partially race-dependent, so the more processes that are started, the more likely for the bug to arise.
The problem can at least partially be avoided by calling
terminate()
on the pool before close:But using a context manager has no effect:
The text was updated successfully, but these errors were encountered: