question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

oscrypto segfaults on catalina

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
wbondcommented, Jan 4, 2020

This fix was included with the 1.1.1 release

1reaction
wbondcommented, Nov 21, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found