[issue30385] Segfault on OSX with 3.6.1

Ned Deily report at bugs.python.org
Fri May 19 11:21:23 EDT 2017


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 <report at bugs.python.org>
<http://bugs.python.org/issue30385>
_______________________________________


More information about the Python-bugs-list mailing list