Multiprocessing IPC failing on Linux #8864
Unanswered
st-the-cloud
asked this question in
Help
Replies: 1 comment 2 replies
-
Hmm, seems to work as expected on my Fedora 41 system (built with python 3.12.7 from |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been trying to adapt a Python program so that it runs cross-platform (original dev is on Windows). I kept encountering an issue where my subprocess (created via the multiprocessing module) would crash, and couldn't figure out why. I've stripped more and more away until I've isolated the issue to be caused by IPC; in the example I'll post I'm using a queue, but the same thing happens with a pipe. The code runs fine if I omit the call to 'queue.put()' (and it works fine when run unfrozen). The subprocess doesn't crash as soon as that call is made, it happens shortly after (under a second after), and I am unable to get any information about why its terminated. I've also experimented with different start modes (spawn, forkserver) and that doesn't resolve the issue either.
Here is my code:
The console output is as follows:
entered name=main
before checking process alive
end of while loop
before checking process alive
loopy crashed
Terminating
The log file contains:
2024-11-04 17:40:05,125 - multiprocessing - DEBUG - Logging set up, about the enter while loop
2024-11-04 17:40:05,125 - multiprocessing - DEBUG - About to put into queue
2024-11-04 17:40:05,125 - multiprocessing - DEBUG - Queue._start_thread()
2024-11-04 17:40:05,125 - multiprocessing - DEBUG - doing self._thread.start()
2024-11-04 17:40:05,125 - multiprocessing - DEBUG - starting thread to feed data to pipe
2024-11-04 17:40:05,126 - multiprocessing - DEBUG - ... done self._thread.start()
2024-11-04 17:40:05,126 - multiprocessing - DEBUG - Put it in the queue
2024-11-04 17:40:05,126 - multiprocessing - DEBUG - About to sleep
And finally I am freezing it using the following arguments:
pyinstaller --hidden-import asyncio --hidden-import uuid --hidden-import secrets --hidden-import queue test_service_mini.py
Environment details:
Pyinstaller 6.11.0
Python 3.12.3
OS: Oracle Linux Server 8.10 (EL8-based)
Linux is running on a VM via Oracle VM VirtualBox Manager, on a Windows 11 Pro 23H2 machine.
Beta Was this translation helpful? Give feedback.
All reactions