Author ned.deily
Recipients Birne94, gromgull, ned.deily, ronaldoussoren
Date 2017-05-19.15:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495207283.92.0.793763680204.issue30385@psf.upfronthosting.co.za>
In-reply-to
Content
Unfortunately, his is a long standing problem when using Python applications that fork on macOS and that end up calling certain system frameworks that under the covers use the system libdispatch which is not fork safe.  In this case, it is most likely due to a call to s urllib function that results in a call to Python's helper module _scproxy to query the macOS system configuration for network proxies.  If your application and system are not using a proxy, the simplest workaround is to disable network proxy lookups by defining the environment variable 'no_proxy' with value '*' in the Python process, for example:

env no_proxy='*' python3.6 ...

Otherwise, restructuring your code to ensure network initialization occurs in the main thread before any forking *might* also prevent the segfault.
History
Date User Action Args
2017-05-19 15:21:23ned.deilysetrecipients: + ned.deily, ronaldoussoren, gromgull, Birne94
2017-05-19 15:21:23ned.deilysetmessageid: <1495207283.92.0.793763680204.issue30385@psf.upfronthosting.co.za>
2017-05-19 15:21:23ned.deilylinkissue30385 messages
2017-05-19 15:21:23ned.deilycreate