-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
topic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Reproducing:
import multiprocessing
class MyExc(Exception):
def __init__(self, stuff):
super().__init__(stuff.two)
class Stuff:
def __init__(self):
self.one = 1
self.two = 2
def run(_):
raise MyExc(Stuff())
if __name__ == "__main__":
with multiprocessing.Pool(3) as pool:
pool.map(run, [1])
This will cause python to hang indefinitely. The cause is the custom exception initialization.
This will throw an exception in the subprocess and will not fail out
AttributeError: 'int' object has no attribute 'two'
Your environment
CPython 3.10.8
Mac OSX Ventura 13.2
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic-multiprocessingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status