Skip to content

Forward multiprocessing.current_process().authkey to workers #9122

@moi90

Description

@moi90

I'm using a multiprocessing Manager to enable communication between the main process and it's workers (for progress reporting). I also want to support dask_jobqueue.SLURMCluster as a method to distribute work. My problem is the following:

To connect to the manager in the main process, the client needs an authkey. However, When a proxy is pickled the authkey is deliberately dropped, due to security concerns.
Python's "regular" multiprocessing makes sure that multiprocessing.current_process().authkey is propagated to spawned or forked processes, so that they are still able to communicate with the main process.

With dask_jobqueue.SLURMCluster, however, this requires some manual setup to get the main process' authkey to the workers.

I'm suggesting to implement a secure way to propagate multiprocessing.current_process().authkey to the worker.

Related issue: python/cpython#139801

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions