Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiprocessing Pool deadlocks on join after empty map operation #59907

Closed
Jimbofbx mannequin opened this issue Aug 16, 2012 · 2 comments
Closed

Multiprocessing Pool deadlocks on join after empty map operation #59907

Jimbofbx mannequin opened this issue Aug 16, 2012 · 2 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@Jimbofbx
Copy link
Mannequin

Jimbofbx mannequin commented Aug 16, 2012

BPO 15702

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-08-17.11:17:37.348>
created_at = <Date 2012-08-16.20:41:47.551>
labels = ['type-bug', 'library']
title = 'Multiprocessing Pool deadlocks on join after empty map operation'
updated_at = <Date 2012-08-17.11:17:37.347>
user = 'https://bugs.python.org/Jimbofbx'

bugs.python.org fields:

activity = <Date 2012-08-17.11:17:37.347>
actor = 'sbt'
assignee = 'none'
closed = True
closed_date = <Date 2012-08-17.11:17:37.348>
closer = 'sbt'
components = ['Library (Lib)']
creation = <Date 2012-08-16.20:41:47.551>
creator = 'Jimbofbx'
dependencies = []
files = []
hgrepos = []
issue_num = 15702
keywords = []
message_count = 2.0
messages = ['168408', '168414']
nosy_count = 3.0
nosy_names = ['Jimbofbx', 'sbt', 'jeffknupp']
pr_nums = []
priority = 'normal'
resolution = 'duplicate'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue15702'
versions = ['Python 3.2']

@Jimbofbx
Copy link
Mannequin Author

Jimbofbx mannequin commented Aug 16, 2012

Following code deadlocks on Windows 7 64-bit, Python 3.2.3

If you have a pool issue a map operation over an empty iterable then try to join later, it will deadlock. If there is no map operation or blah in the code below isn't empty, it does not deadlock

from multiprocessing import Pool

def main():
    p = Pool();
    blah = [];
    print("Mapping");
    p.map(dummy, blah);
    p.close();
    p.join(); # deadlocks here
    print("Done");

def dummy(x):
    pass;

if __name__ == "__main__":
    main();

@Jimbofbx Jimbofbx mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 16, 2012
@jeffknupp
Copy link
Mannequin

jeffknupp mannequin commented Aug 16, 2012

This is a duplicate of http://bugs.python.org/issue12157, which was fixed.

@sbt sbt mannequin closed this as completed Aug 17, 2012
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants