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 package incompatible with PyObjC #57767

Closed
mrmekon mannequin opened this issue Dec 8, 2011 · 3 comments
Closed

multiprocessing package incompatible with PyObjC #57767

mrmekon mannequin opened this issue Dec 8, 2011 · 3 comments
Assignees
Labels
OS-mac type-bug An unexpected behavior, bug, or error

Comments

@mrmekon
Copy link
Mannequin

mrmekon mannequin commented Dec 8, 2011

BPO 13558
Nosy @ronaldoussoren, @ned-deily
Superseder
  • bpo-8713: multiprocessing needs option to eschew fork() under Linux
  • Files
  • threadtest3.py: Example of multiprocessing failing with PyObjC
  • 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 = 'https://github.com/ronaldoussoren'
    closed_at = <Date 2012-01-04.03:34:27.530>
    created_at = <Date 2011-12-08.20:26:13.579>
    labels = ['OS-mac', 'type-bug']
    title = 'multiprocessing package incompatible with PyObjC'
    updated_at = <Date 2012-01-04.03:34:27.528>
    user = 'https://bugs.python.org/mrmekon'

    bugs.python.org fields:

    activity = <Date 2012-01-04.03:34:27.528>
    actor = 'ned.deily'
    assignee = 'ronaldoussoren'
    closed = True
    closed_date = <Date 2012-01-04.03:34:27.530>
    closer = 'ned.deily'
    components = ['macOS']
    creation = <Date 2011-12-08.20:26:13.579>
    creator = 'mrmekon'
    dependencies = []
    files = ['23884']
    hgrepos = []
    issue_num = 13558
    keywords = []
    message_count = 3.0
    messages = ['149051', '149053', '150580']
    nosy_count = 3.0
    nosy_names = ['ronaldoussoren', 'ned.deily', 'mrmekon']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '8713'
    type = 'behavior'
    url = 'https://bugs.python.org/issue13558'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @mrmekon
    Copy link
    Mannequin Author

    mrmekon mannequin commented Dec 8, 2011

    The multiprocessing package appears to spawn a new process by calling only fork(). Apple's CoreFoundation libraries (and possibly more, I do not know the full extent) *require* new processes to be spawned with the full fork()+exec*() combo.

    When using PyObjC to access native Mac libraries, Python's multithreading library is not usable. The error thrown is:

    ------------------------
    The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
    Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
    ------------------------

    Test code: https://gist.github.com/1448398

    @mrmekon mrmekon mannequin assigned ronaldoussoren Dec 8, 2011
    @mrmekon mrmekon mannequin added OS-mac type-bug An unexpected behavior, bug, or error labels Dec 8, 2011
    @ned-deily
    Copy link
    Member

    (Reference original discussion in pyobjc-dev mailing list archived here: http://comments.gmane.org/gmane.comp.python.pyobjc.devel/5965)

    @ned-deily
    Copy link
    Member

    bpo-8713 proposes adding the option of using processes for multiprocessing rather than bare forks. Let's consolidate this issue with that one.

    @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
    OS-mac type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants