Relative Content

Tag Archive for pythonpython-3.xdockermultiprocessing

Python multiprocessing.Queue put kills process in Docker container

I’m running a small multiprocessing test in a Docker container. The test uses multiprocessing.Queue with a consumer and a producer. The minimal code that leads to the crash can be found below, together with the Dockerfile.
In the code, the main process starts a new process that receives a reference to the Queue, and uses Queue.put() to put an integer on the queue to the main process. What I’m seeing is that the producer process gets killed during the call to .put(), there is no Exception raised whatsoever.