ExamplePackage: demonstrates joblib/loky multiprocessing Issue in frozen executables
This repository should function as a minimal reproducible example for an issue that occurs with joblib/loky multiprocessing used in a frozen executable.
There are several branches that demonstrate different approaches, all leading to either a) a crash or b) a multiprocessing bomb
Branches:
- pool use of
multiprocessing.Pool
- threadpool use of
multiprocessing.ThreadPool
- queuethread use of
queue.Queue()
andthreading.Thread
- contextpool use of
multiprocessing.get_context("spawn").Pool()
Builds:
Download builds for each branch:
- expackage-0.0.1-win-amd64-3.7-pool.zip
- expackage-0.0.1-win-amd64-3.7-threadpool.zip
- expackage-0.0.1-win-amd64-3.7-queuethread.zip
- expackage-0.0.1-win-amd64-3.7-contextpool.zip
Logs (expackage.exe
cli-mode):
-
- cluster function returns results
- after "Press any key to exit...":
OSError: [WinError 87] The parameter is incorrect
-
- multiprocessing bomb, failing with:
joblib.externals.loky.process_executor.TerminatedWorkerError: A worker process managed by the executor was unexpectedly terminated. ... ERROR: The process "16800" not found. ERROR: The process "7964" not found. ERROR: The process "13552" not found. ERROR: The process "17616" not found.
-
- equal to queuethread
-
contextpool (existing pool object)
- no error, but slow