pharo-project / pharo-vm

This is the VM used by Pharo
http://pharo.org
Other
113 stars 69 forks source link

SSL issue when trying to run in Fedora 33 and 34 #217

Open earnest70 opened 3 years ago

earnest70 commented 3 years ago

Newer version of Fedora use libssl 1.1.1 which makes any ZnClient, Iceberg and any other libs that use ssl to crash the VM.

Running it under GDB we notice the failure is at:

#0  0x00007fffdc1a2dbf in **SSL_CTX_set_cipher_list ()** from /pharo-vm/lib/libssl.so.1.0.0
#1  0x00007fffdc3d5482 in sqSetupSSL (ssl=ssl@entry=0x74f7f0, server=server@entry=0)

With error: 140737344571080:error:140A90A1:lib(20):func(169):reason(161):ssl_lib.c:1983:

Asking openssl about it, it give us:

> openssl errstr 140A90A1
error:140A90A1:SSL routines:SSL_CTX_new:library has no ciphers

It looks like the ciphers are not being loaded, because there is no call for SSL init? (I couldn't find it in the plugin) Should we need to call SSL_Library_init in the SqueakSSL.c plugin before opening a SSL context ?

https://wiki.openssl.org/index.php/Library_Initialization

Maybe I'm missing something.

guillep commented 3 years ago

Hi @earnest70 , could you give us some info about what pharo setup are you using? How did you download Pharo, what version?

earnest70 commented 3 years ago

Just the basic setup from get.pharo.org.

curl https://get.pharo.org/64/90+vmT | bash
./pharo-ui

Running: ZnClient new url: 'https://google.com'; get.

Crashes the VM with

primitiveSSL:connect:startingAt:count:into:
stack page bytes 8192 available headroom 5576 minimum unused headroom 5944
    (Segmentation fault)

Pharo 9 build: 1348, commit: c01c6e1, date: 22 April 2021

gcotelli commented 3 years ago

I'm trying the same on Manjaro Linux and it also segfaults. Find attached the crash dump. crash.dmp.txt

Maybe it's related to pharo-project/pharo#8860.

Image
-----
/home/gcotelli/Programming/Pharo-9/Pharo.image
Pharo9.0.0
Build information: Pharo-9.0.0+build.1432.sha.b98e4624b9ecdbf454fedfbae50c4ced5185039d (64 Bit)
Unnamed
Operating System Details
------------------------
Manjaro Linux \r  (\n) (\l)

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.0.5
DISTRIB_CODENAME=Ornara
DISTRIB_DESCRIPTION="Manjaro Linux"
Linux version 5.12.2-1-MANJARO (builduser@LEGION) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Fri May 7 17:53:15 UTC 2021