Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on MacOS Catalina #235

Closed
mbirk opened this issue Nov 13, 2019 · 7 comments
Closed

Crash on MacOS Catalina #235

mbirk opened this issue Nov 13, 2019 · 7 comments
Assignees
Labels
Milestone

Comments

@mbirk
Copy link

@mbirk mbirk commented Nov 13, 2019

When using Snowflake connector and Boto3 together on MacOS Catalina, the process dies when making any Boto3 request. The problem did not occur with Mojave.

Note that we can workaround the issue by disabling the monkey-patch done in ssl_wrap_socket.inject_into_urllib3:

import requests
f = requests.packages.urllib3.connection.ssl_wrap_socket
import snowflake.connector
requests.packages.urllib3.connection.ssl_wrap_socket = f

import boto3
s3 = boto3.client('s3')
s3.head_object(Bucket='some-bucket', Key='some-key')

Please answer these questions before submitting your issue. Thanks!

  1. What version of Python are you using (python --version)?
    Python 3.7.5

  2. What operating system and processor architecture are you using (python -c 'import platform; print(platform.platform())')?
    Darwin-19.0.0-x86_64-i386-64bit

  3. What are the component versions in the environment (pip list)?

Package                    Version
-------------------------- ---------
asn1crypto                 1.2.0
awscli                     1.16.280
azure-common               1.1.23
azure-storage-blob         2.1.0
azure-storage-common       2.1.0
boto3                      1.10.16
botocore                   1.13.16
certifi                    2019.9.11
cffi                       1.13.2
chardet                    3.0.4
colorama                   0.4.1
cryptography               2.8
docutils                   0.15.2
future                     0.18.2
idna                       2.8
ijson                      2.5.1
jmespath                   0.9.4
oscrypto                   1.1.0
pip                        19.3.1
pyasn1                     0.4.7
pycparser                  2.19
pycryptodomex              3.9.3
PyJWT                      1.7.1
pyOpenSSL                  19.0.0
python-dateutil            2.8.0
pytz                       2019.3
PyYAML                     5.1.2
requests                   2.22.0
rsa                        3.4.2
s3transfer                 0.2.1
setuptools                 41.2.0
six                        1.13.0
snowflake-connector-python 2.0.4
urllib3                    1.24.3

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
import snowflake.connector, boto3
s3 = boto3.client('s3')
s3.head_object(Bucket='some-bucket', Key='some-key')

  1. What did you expect to see?
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
  1. What did you see instead?
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecRandomDefault' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingKey' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingPKCS7Key' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingPKCS5Key' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingPKCS1Key' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingOAEPKey' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecPaddingNoneKey' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecModeCBCKey' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecTransformInputAttributeName' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecDigestTypeAttribute' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecDigestLengthAttribute' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecIVKey' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrIsExtractable' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecDigestSHA1' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecDigestSHA2' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecDigestMD5' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyType' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeRSA' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeDSA' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeECDSA' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeySizeInBits' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrLabel' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrCanSign' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrCanVerify' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeAES' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeRC4' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeRC2' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyType3DES' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kSecAttrKeyTypeDES' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kCFAllocatorDefault' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kCFTypeArrayCallBacks' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kCFBooleanTrue' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kCFTypeDictionaryKeyCallBacks' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
/path/to/.venv/lib/python3.7/site-packages/cffi/cparser.py:164: UserWarning: Global variable 'kCFTypeDictionaryValueCallBacks' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
  "(usually 'extern')" % (decl.name,))
Abort trap: 6
  1. Can you set logging to DEBUG and collect the logs?
import logging
import os

for logger_name in ['snowflake.sqlalchemy', 'snowflake.connector', 'botocore']: 
    logger = logging.getLogger(logger_name)
    logger.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    ch.setFormatter(logging.Formatter('%(asctime)s - %(threadName)s %(filename)s:%(lineno)d - %(funcName)s() - %(levelname)s - %(message)s'))
    logger.addHandler(ch)
2019-11-12 19:01:48,828 - MainThread ssl_wrap_socket.py:86 - inject_into_urllib3() - DEBUG - Injecting ssl_wrap_socket_with_ocsp
2019-11-12 19:01:48,836 - MainThread auth.py:71 - <module>() - DEBUG - cache directory: /Users/mbirk/Library/Caches/Snowflake
2019-11-12 19:01:48,992 - MainThread cursor.py:40 - <module>() - DEBUG - Failed to import pyarrow. No Apache Arrow result set format can be used.
2019-11-12 19:01:48,997 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from creating-client-class.iot-data to creating-client-class.iot-data-plane
2019-11-12 19:01:49,000 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from before-call.apigateway to before-call.api-gateway
2019-11-12 19:01:49,000 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from request-created.machinelearning.Predict to request-created.machine-learning.Predict
2019-11-12 19:01:49,002 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from before-parameter-build.autoscaling.CreateLaunchConfiguration to before-parameter-build.auto-scaling.CreateLaunchConfiguration
2019-11-12 19:01:49,002 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from before-parameter-build.route53 to before-parameter-build.route-53
2019-11-12 19:01:49,002 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from request-created.cloudsearchdomain.Search to request-created.cloudsearch-domain.Search
2019-11-12 19:01:49,003 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from docs.*.autoscaling.CreateLaunchConfiguration.complete-section to docs.*.auto-scaling.CreateLaunchConfiguration.complete-section
2019-11-12 19:01:49,005 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from before-parameter-build.logs.CreateExportTask to before-parameter-build.cloudwatch-logs.CreateExportTask
2019-11-12 19:01:49,005 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from docs.*.logs.CreateExportTask.complete-section to docs.*.cloudwatch-logs.CreateExportTask.complete-section
2019-11-12 19:01:49,005 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from before-parameter-build.cloudsearchdomain.Search to before-parameter-build.cloudsearch-domain.Search
2019-11-12 19:01:49,005 - MainThread hooks.py:417 - _alias_event_name() - DEBUG - Changing event name from docs.*.cloudsearchdomain.Search.complete-section to docs.*.cloudsearch-domain.Search.complete-section
2019-11-12 19:01:49,011 - MainThread credentials.py:1947 - load_credentials() - DEBUG - Looking for credentials via: env
2019-11-12 19:01:49,011 - MainThread credentials.py:1073 - load() - INFO - Found credentials in environment variables.
2019-11-12 19:01:49,012 - MainThread loaders.py:174 - load_file() - DEBUG - Loading JSON file: /Users/mbirk/src/baotris/infra/.venv/lib/python3.7/site-packages/botocore/data/endpoints.json
2019-11-12 19:01:49,015 - MainThread hooks.py:210 - _emit() - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x10c6e4710>
2019-11-12 19:01:49,024 - MainThread loaders.py:174 - load_file() - DEBUG - Loading JSON file: /Users/mbirk/src/baotris/infra/.venv/lib/python3.7/site-packages/botocore/data/s3/2006-03-01/service-2.json
2019-11-12 19:01:49,029 - MainThread hooks.py:210 - _emit() - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_post at 0x10c6db0e0>
2019-11-12 19:01:49,029 - MainThread hooks.py:210 - _emit() - DEBUG - Event creating-client-class.s3: calling handler <function lazy_call.<locals>._handler at 0x10aac75f0>
2019-11-12 19:01:49,030 - MainThread hooks.py:210 - _emit() - DEBUG - Event creating-client-class.s3: calling handler <function add_generate_presigned_url at 0x10c6d6e60>
2019-11-12 19:01:49,030 - MainThread args.py:199 - compute_s3_config() - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2019-11-12 19:01:49,081 - MainThread endpoint.py:266 - create_endpoint() - DEBUG - Setting s3 timeout as (60, 60)
2019-11-12 19:01:49,082 - MainThread loaders.py:174 - load_file() - DEBUG - Loading JSON file: /Users/mbirk/src/baotris/infra/.venv/lib/python3.7/site-packages/botocore/data/_retry.json
2019-11-12 19:01:49,083 - MainThread client.py:139 - _register_retries() - DEBUG - Registering retry handlers for service: s3
2019-11-12 19:01:49,084 - MainThread client.py:232 - _get_s3_addressing_handler() - DEBUG - Defaulting to S3 virtual host style addressing with path style addressing fallback.
2019-11-12 19:01:49,084 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-parameter-build.s3.HeadObject: calling handler <function sse_md5 at 0x10c703290>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-parameter-build.s3.HeadObject: calling handler <function validate_bucket_name at 0x10c703200>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-parameter-build.s3.HeadObject: calling handler <bound method S3RegionRedirector.redirect_from_cache of <botocore.utils.S3RegionRedirector object at 0x10cc6dd90>>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-parameter-build.s3.HeadObject: calling handler <function generate_idempotent_uuid at 0x10c70bdd0>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-call.s3.HeadObject: calling handler <function add_expect_header at 0x10c703560>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-call.s3.HeadObject: calling handler <bound method S3RegionRedirector.set_request_url of <botocore.utils.S3RegionRedirector object at 0x10cc6dd90>>
2019-11-12 19:01:49,085 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-call.s3.HeadObject: calling handler <function inject_api_version_header_if_needed at 0x10c70f8c0>
2019-11-12 19:01:49,086 - MainThread endpoint.py:101 - make_request() - DEBUG - Making request for OperationModel(name=HeadObject) with params: {'url_path': '/some-bucket/some-key', 'query_string': {}, 'method': 'HEAD', 'headers': {'User-Agent': 'Boto3/1.10.16 Python/3.7.5 Darwin/19.0.0 Botocore/1.13.16'}, 'body': b'', 'url': 'https://s3.amazonaws.com/some-bucket/some-key', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x10cc3b390>, 'has_streaming_input': False, 'auth_type': None, 'signing': {'bucket': 'some-bucket'}}}
2019-11-12 19:01:49,086 - MainThread hooks.py:210 - _emit() - DEBUG - Event request-created.s3.HeadObject: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x10cc3b350>>
2019-11-12 19:01:49,086 - MainThread hooks.py:210 - _emit() - DEBUG - Event choose-signer.s3.HeadObject: calling handler <bound method ClientCreator._default_s3_presign_to_sigv2 of <botocore.client.ClientCreator object at 0x10c8b3910>>
2019-11-12 19:01:49,086 - MainThread hooks.py:210 - _emit() - DEBUG - Event choose-signer.s3.HeadObject: calling handler <function set_operation_specific_signer at 0x10c70bcb0>
2019-11-12 19:01:49,086 - MainThread hooks.py:210 - _emit() - DEBUG - Event before-sign.s3.HeadObject: calling handler <function fix_s3_host at 0x10c58e7a0>
2019-11-12 19:01:49,087 - MainThread utils.py:941 - switch_to_virtual_host_style() - DEBUG - Checking for DNS compatible bucket for: https://s3.amazonaws.com/some-bucket/some-key
2019-11-12 19:01:49,087 - MainThread utils.py:959 - switch_to_virtual_host_style() - DEBUG - URI updated to: https://some-bucket.s3.amazonaws.com/some-key
2019-11-12 19:01:49,087 - MainThread auth.py:364 - add_auth() - DEBUG - Calculating signature using v4 auth.
2019-11-12 19:01:49,087 - MainThread auth.py:365 - add_auth() - DEBUG - CanonicalRequest:
HEAD
/some-key

host:some-bucket.s3.amazonaws.com
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20191113T030149Z

host;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2019-11-12 19:01:49,087 - MainThread auth.py:367 - add_auth() - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20191113T030149Z
20191113/us-east-1/s3/aws4_request
3df6aac51780df5980951760ae276158c7ed708f6be2b14bdc0164aa297cad06
2019-11-12 19:01:49,087 - MainThread auth.py:369 - add_auth() - DEBUG - Signature:
196cd7abdb8f9d418e5bbda76cc41597b19a80a007ab8776a19784c0484fb7d2
2019-11-12 19:01:49,087 - MainThread endpoint.py:187 - _do_get_response() - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=HEAD, url=https://some-bucket.s3.amazonaws.com/some-key, headers={'User-Agent': b'Boto3/1.10.16 Python/3.7.5 Darwin/19.0.0 Botocore/1.13.16', 'X-Amz-Date': b'20191113T030149Z', 'X-Amz-Content-SHA256': b'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAXKYZN2N4OO5AKSEW/20191113/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=196cd7abdb8f9d418e5bbda76cc41597b19a80a007ab8776a19784c0484fb7d2'}>
@smtakeda smtakeda added the jira label Nov 14, 2019
@smtakeda

This comment has been minimized.

Copy link
Contributor

@smtakeda smtakeda commented Nov 14, 2019

Looks like this issue duplicates snowflakedb/snowflake-sqlalchemy#130 and the root cause is https://forums.developer.apple.com/thread/119429 ?

@mbirk

This comment has been minimized.

Copy link
Author

@mbirk mbirk commented Nov 14, 2019

Aha, yes that looks like the same issue. Can you comment on the impact of the workaround I posted? (Perhaps the client won't be able to detect certificates that have been revoked via OCSP?)

@smtakeda

This comment has been minimized.

Copy link
Contributor

@smtakeda smtakeda commented Nov 14, 2019

I have not looked into the details, though, my theory is the direct cause seems importing oscrypto that attempts to load the native OpenSSL library, and then it crashed because the library API is not compatible. One workaround on our end would be not to use oscrypto to get the public key in the OCSP check.

Please note the monkey patch is intentionally added to increase the security by checking revocation status on top of TLS handshake.

@worldwise001

This comment has been minimized.

Copy link
Contributor

@worldwise001 worldwise001 commented Nov 20, 2019

I just confirmed through extensive use of a debugger that it's importing oscrypto that is the problem. Specifically it is defaulting to the mac crypto backend instead of openssl.

code snippet where it fails 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')
worldwise001 added a commit to worldwise001/snowflake-connector-python that referenced this issue Nov 20, 2019
…ing crashes on MacOS Catalina
worldwise001 added a commit to worldwise001/snowflake-connector-python that referenced this issue Nov 21, 2019
@worldwise001

This comment has been minimized.

Copy link
Contributor

@worldwise001 worldwise001 commented Nov 21, 2019

I fixed the oscrypto bug upstream, I’ll see if I can get them to cut a release.

@keller00

This comment has been minimized.

Copy link
Contributor

@keller00 keller00 commented Nov 21, 2019

Thank you, @worldwise001 !

@snowstakeda snowstakeda added this to the v2.1.0 milestone Nov 22, 2019
@snowstakeda

This comment has been minimized.

Copy link
Collaborator

@snowstakeda snowstakeda commented Nov 22, 2019

Not reproducible on my MacOS Catalina Parallel VM, but one of coworkers laptop hit this, and #241 worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.