So, I’ve been trying a few different things without success.
- I’ve been playing around with
kerl
to build and install a custom version of Erlang.
- I tried to build with different crypto backends
openssl
, libressl
, boringssl
in the build options:
--with-ssl=/usr/local/opt/libressl
- Make sure that
libcrypto
has been linked correctly:
$ otool -L kerl/19.3/lib/crypto-3.7.3/priv/lib/crypto.so
kerl/19.3/lib/crypto-3.7.3/priv/lib/crypto.so:
/usr/local/opt/libressl/lib/libcrypto.41.dylib (compatibility version 42.0.0, current version 42.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)
1> crypto:info_lib().
[{<<"OpenSSL">>,536870912,<<"LibreSSL 2.5.4">>}]
- Analyse
erl
with dtrace
and other tools to try to figure out where the crash happens with a simple ssl:connect/3
call:
...
55688/0x1c540c: stat64("/Users/redrabbit/kerl/19.3/lib/crypto-3.7.3/priv/lib/crypto.so\0", 0xB12B0FC0, 0x20) = 0 0
55688/0x1c540c: open("/Users/redrabbit/kerl/19.3/lib/crypto-3.7.3/priv/lib/crypto.so\0", 0x0, 0x0) = 33 0
...
55688/0x1c540c: stat64("/usr/local/opt/libressl/lib/libcrypto.41.dylib\0", 0xB12B0DE0, 0x1) = 0 0
55688/0x1c540c: open("/usr/local/opt/libressl/lib/libcrypto.41.dylib\0", 0x0, 0x0) = 33 0
...
55688/0x1c5400: open("/Users/redrabbit/kerl/19.3/lib/ssl-8.1.1/ebin/ssl_cipher.beam\0", 0x0, 0x1B6) = 33 0
...
55688/0x1c53fe: open("/Users/redrabbit/kerl/19.3/lib/ssl-8.1.1/ebin/tls_v1.beam\0", 0x0, 0x1B6) = 33 0
...
55688/0x1c53fe: open("/Users/redrabbit/kerl/19.3/lib/ssl-8.1.1/ebin/tls_socket.beam\0", 0x0, 0x1B6) = 33 0
From my analyse, I cannot tell where the process is actually crashing. It seems it’s in ssl_connection.beam
. But can’t say for sure.
The only external libraries being present in the logs being Erlang’s crypto.so
and crypto_callback.so
and the ssl lib (in my current test case, libcrypto.41.dylib
from libressl
).
If anybody more experienced wants to help
, he/she would be really welcome.
But hey, that’s what happens when you play with the first beta
.