Two ways to fix the Snowflake FFI crash#623
Merged
Conversation
Versions after that vendor a libffi-9c61262e.so.8.1.0 which would be great except when we are running inside of a PostgreSQL process (which itself, in the case of PG12, uses libffi.so.6). In that case the Python code resolves to the cffi symbols from the system library (rather than the vendored libffi library) and crashes with ABI errors: ``` $ docker run --rm -it --entrypoint bash splitgraph/engine:development LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.6 python3 -c "from OpenSSL.SSL import _VerifyHelper; _VerifyHelper(lambda cnx, x509, err_no, err_depth, return_code: err_no == 0)" ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time) ```
c5c6e8d to
7a1fcde
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pin cffi to <=1.14.
Versions after that vendor a
libffi-9c61262e.so.8.1.0which would be great except when we are running inside of a PostgreSQL process (which itself, in the case of PG12, useslibffi.so.6). In that case the Python code resolves to the cffi symbols from the system library (rather than the vendored libffi library) and crashes with ABI errors:1.14 comes with
libffi-c643fa1a.so.6.0.4which is compatible with the version inside of the engine (and that PG requires).There are two commits in this PR that both fix this issue. Not sure which one we should pick: