Ned Deily added the comment:

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.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30385>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to