Open viferga opened 5 years ago
Seems to be solved with current distributable implementation but needs revision.
This is still happening on ubuntu:jammy
, with versions
root@b764c64be8c7:/usr/local/metacall/build# node -e 'console.log(process.versions.openssl)'
1.1.1m
root@b764c64be8c7:/usr/local/metacall/build# python3 -c 'import ssl; print(ssl.OPENSSL_VERSION.split()[1])'
3.0.2
I am reopening this for now, I have tried to use dlmopen
for try to isolate the libraries but it seems not to work, it fails with valgrind, probably some issue related to the current design of metacall, which relies on having a global scope with metacall library.
Also it seems to be related with rust, when using a similar version (3.0.4 and 3.0.6) if we disable calls in node to rs when python is also loaded in node_port
, it does not fail.
https://github.com/metacall/core/commit/9be934887d70bff3c6de9657fb9f9d262e9aa40c
Here's the issue of Rust: https://github.com/metacall/core/commit/ad9e7cf7c9a5d04e214f2c0bc1fdaabfa8d1a911 It is unrelated apparently.
When running a NodeJS script with NodeJS (compiled with OpenSSL statically) and then loading any library in Python that uses Py__Hash (which is a C extension for Python using OpenSSL dynamically linked) it generates a segmentation fault (this problem can be reproduced by running this example with NodeJS: https://github.com/metacall/pdf-generator-email-sender-landing-page-example).
In this example Py__Hash is using OpenSSL 1.1. and NodeJS is using 1.0.2p:
This is a fragment of the segmentation fault obtained with valgrind referring to OpenSSL initialization of Py_Hash.