[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-14 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Closing in favor of issue33725 -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-14 Thread Davin Potts
Davin Potts added the comment: Resolution is marked dupe but status is still open. Are we closing this one or is there a more specific remedy for this situation (as opposed to what issue33725 discusses) that would be helpful to document? -- nosy: +davin

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I am going to dupe this to 33725 after all. -- resolution: -> duplicate superseder: -> High Sierra hang when using multi-processing ___ Python tracker

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Nope, actually double fork doesn't work. It's misleading because in my testing, the first invocation of the process causes the core dump, but subsequent runs do not. -- ___ Python tracker

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm still testing this solution, but it looks like if you set the environment variable, and then double fork, the granchild won't crash. Roughly: os.putenv('OBJC_DISABLE_INITIALIZE_FORK_SAFETY', 'YES') pid = os.fork() if pid == 0: subpid = os.fork()

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Based on my testing, the environment variable has to be set before the parent process starts. Neither os.environ nor os.putenv seem to do the trick. -- ___ Python tracker

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've done a fair bit of testing and it seems rather inconsistent as to whether either of these work when added right before an explicit call to `os.fork()`: os.environ['OBJC_DISABLE_INITIALIZE_FORK_SAFETY'] = 'YES'

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm not sure whether it's a duplicate or not, since in my case it doesn't hang, but instead core dumps. It's seems like the reasoning given in the Ruby bug is relevant to Python too, so maybe we should adopt the same workaround. For our internal

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This can a duplicate of https://bugs.python.org/issue33725 -- ___ Python tracker ___ ___

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Apparently, GitLab have a more permanent solution around this by enabling the Objective-C runtime before any forking happens: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16649/diffs -- ___

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 12, 2018, at 13:34, Pablo Galindo Salgado wrote: > Apparently setting the env variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES > should fix some fork-related changes. Have you tried already doing this? Does > it change the behaviour of the errors

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Apparently setting the env variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES should fix some fork-related changes. Have you tried already doing this? Does it change the behaviour of the errors in any way? -- nosy: +pablogsal

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: That should of course be 10.14 Mojave. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35219] macOS 10.14 Mojave crashes in multiprocessing

2018-11-12 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- title: macOS 10.14 High Sierra crashes in multiprocessing -> macOS 10.14 Mojave crashes in multiprocessing ___ Python tracker ___