简体   繁体   中英

MacOS Catalina Python forking issue

I am currently facing the issue, that multiprocessing in python with fork as starting method causes a crash on Catalina. The same Code worked perfectly fine on Mojave, even without the classic workaround OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES . This line does not seem to have any effect in Catalina anyway. The crash does not result in any catchable exception or traceback, so i am very sorry but i cannot provide more information. It occurs whenever the forked process uses openMP threading, id est spawns threads itself. Does anyone know how to fix the forking behaviour on Catalina ? Using another starting method is probably not an option since i am dealing with none pickable objects.

its kinda hard to determine your cause without a Crash Report.

Attempt this to find your crash reports:

Open the Console application: Type “Console” into Spotlight or navigate to “Application -> Utilities -> Console.app.” then Click on Crash Reports.

I had similar issue, where Python kept crashing when i was running Ansible, on Mojave..the classic fix was to add "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES"

However, with Catalina this was not the fix for me any longer. I had to deal with missing links to libcrypto openssl on OSX, The openssl this did the trick for me.

Try this script (or run the commands manually) if you indeed have an OpenSSL issue:

https://gist.github.com/cpavlatos/265d5091a89148eec1cfa2d10e200d32

Note: Prior to running the above script, you might want to cd to /usr/local/Cellar/openssl/ and see what version you have then change the script accordingly.

Also, worth checking is this thread: https://github.com/Homebrew/homebrew-core/issues/44996#issuecomment-543945199 Summarized better here: https://gist.github.com/llbbl/c54f44d028d014514d5d837f64e60bac#gistcomment-3115206

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM