I'm facing a strange bug. I have a parent process that spawns two child processes with infinite loops that provide different services. Each child shares a multiprocessing.manager.list()
variable type with the parent process. All processes (parent and children) are fully encapsulated in try except finally
blocks so I can catch and process various errors. I've even used the except Exception
term as a final catch all term. In spite of all this, I am still getting the following error pop up regularly:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\Python35\lib\multiprocessing\spawn.py", line 100, in spawn_main
new_handle = steal_handle(parent_pid, pipe_handle)
File "C:\Program Files\Python35\lib\multiprocessing\reduction.py", line 86, in steal_handle
_winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied
From the log file I produce, there's no sign of it coming from any of my processes (which is obvious given the traceback), and given what I see in the code this has no effect on the program. I'm under the impression that for the multiprocessing.Manager
to function to work it needs to generate a separate process just for shuttling these variables around. The problem is that I really need to at least hide the error from the command prompt. A lot of information is being presented to the user there and stray errors popping up regularly is very distracting.
I can't show code unfortunately as I'm at work, and as its many thousands of lines at the moment I'm not sure of the exact source of the bug. I will continue trying to narrow things down and if I do manage to create a small example I'll edit the question with it.
Any ideas or suggestions would be greatly appreciated.
Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32