oscrypto segfaults on catalina
See original GitHub issueI’ve come here after an all-day debugging session. tl;dr I think oscrypto is picking up the wrong SSL backend for catalina (OS X 10.15.1) which causes a crash.
There’s some workarounds as documented here: https://forums.developer.apple.com/thread/119429 Though that seems pretty gnarly.
Specifically I’m finding it failing in _libcrypto_cffi:
libcrypto_path = _backend_config().get('libcrypto_path')
if libcrypto_path is None:
libcrypto_path = find_library('crypto')
if not libcrypto_path:
raise LibraryNotFoundError('The library libcrypto could not be found')
try:
vffi = FFI()
vffi.cdef("const char *SSLeay_version(int type);")
version_string = vffi.string(vffi.dlopen(libcrypto_path).SSLeay_version(0)).decode('utf-8') #### fails here
except (AttributeError):
vffi = FFI()
vffi.cdef("const char *OpenSSL_version(int type);")
version_string = vffi.string(vffi.dlopen(libcrypto_path).OpenSSL_version(0)).decode('utf-8')
I suspect we are just picking a version that makes Catalina extremely upset, and so if we can pick a pinned version that would be better.
I posted something similar here: https://github.com/snowflakedb/snowflake-connector-python/issues/235
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
Python crashing on MacOS 10.15 Beta (19A582a) with "/usr ...
This worked for me on Catalina 10.15.4, but I had /usr/local/Cellar/openssl@1.1 and used the equivalent files. Using the x.1.0.0.dylib ...
Read more >Issue 38873: find_library for libcrypto and libssl on Catalina ...
With the release of Mac OS X Catalina, libcrypto.dylib is a dummy library that causes an automatic segfault, to prevent upstream software ...
Read more >oscrypto Changelog - PyUp.io
Use versioned libcrypto.dylib and libssl.dylib on macOS Catalina to prevent segfaults - Fix warnings reported when using with cffi 1.13.2 ...
Read more >The Curious Case of Python, Catalina, Snowflake, and Abort ...
The Curious Case of Python, Catalina, Snowflake, and Abort Trap 6 ... but typically it's more controlled than a segfault, but deeper into ......
Read more >macOS Catalina 10.15 , I upgrdaded to thi… - Apple Community
macOS Catalina 10.15 , I upgrdaded to this version and I have segmentation fault :11 error when I run python. need help regarding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This fix was included with the 1.1.1 release
I just need the CI on master to pass. I updated the CI config to pull in some revised matrix assignments across different CI providers that I made for asn1crypto. The major benefit being running the tests on 10.15 via GitHub Actions, however something is broken in regards to Circle and the macOS tests there. I’ll need to make sure those look good before the next release.