Author vstinner
Recipients Mirko Friedenhagen, ned.deily, ronaldoussoren, vstinner
Date 2017-10-19.12:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi, can you please explain how to reproduce your issue?

According to the crash report, it seems like you are running Ansible on macOS and that the Python function _scproxy.get_proxies() was called.

get_proxies() calls CFPreferencesCopyAppValue() which calls indirectly performForkChildInitialize(). It seems like Ansible forked the process or something like that. Finally, performForkChildInitialize() calls _objc_fatal() which kills the process with abort().

The parent process is also Python ("Parent Process: python2.7 [4305]") which confirms that the application used fork().

See also:

* bpo-9405: Similar but old (2010) crash caused by SCDynamicStoreCopyProxies in a small Python application using multiprocessing and so using fork
* bpo-27126: "Apple-supplied libsqlite3 on OS X is not fork safe;  can cause crashes"
* "fork() without exec() is dangerous in large programs" article by Evan Jones (2016-August-16): -- this article mentions bpo-27126

Ned Deily's advice from bpo-9405: "A quick workaround is to make a [get_proxies()] call from the main process."

IMHO the safest fix is to not run any Python program after fork(). Using use subprocess to use fork() immmediately followed by exec(). It's not safe to execute code after fork(), many functions are not "fork safe". But I know that many applications don't care, since there is also a lot of functions which are fork safe...
Date User Action Args
2017-10-19 12:36:40vstinnersetrecipients: + vstinner, ronaldoussoren, ned.deily, Mirko Friedenhagen
2017-10-19 12:36:40vstinnersetmessageid: <>
2017-10-19 12:36:40vstinnerlinkissue31818 messages
2017-10-19 12:36:40vstinnercreate