Segfault with ZnClient and https

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Segfault with ZnClient and https

Petter
Hi, I have trouble with latest Fedora 33, plain installation and Pharo 8.0
stable, 64 bit.

When I try a

ZnClient new url: 'https://something..'; get.

The image segfaults.

Last lines from log are:

primitiveSSL:setStringProperty:toValue:
atAllPut:
atAllPut:
primitiveSSL:connect:startingAt:count:into:

stack page bytes 8192 available headroom 5576 minimum unused headroom 5952

---

It seems libssl and libcrypto is bundled togheter with Pharo, looks like
version 1.0.0.

I then try to compile openssl with 1.0.0-stable which I build myself, but
when replacing the Pharo-libs with my own I get the message that I am using
a too old tls-version error.

I am a little confused on what is happening here. Do anyone have a clue?

(git checkouts over ssh works fine, strange enough)

Petter



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Reply | Threaded
Open this post in threaded view
|

Re: Segfault with ZnClient and https

Sven Van Caekenberghe-2
Hi Petter,

It should work, but of course there might be something wrong.
To get a baseline for your issue here is what I did, and what you could try to repeat.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"

$ uname -a
Linux t3-pharo-test 4.15.0-140-generic #144-Ubuntu SMP Fri Mar 19 14:12:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ mkdir pharo

$ cd pharo

$ curl get.pharo.org/64/90+vm | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3054  100  3054    0     0   129k      0 --:--:-- --:--:-- --:--:--  129k
Downloading the latest 90 Image:
    http://files.pharo.org/get-files/90/pharo64.zip
Pharo.image
Downloading the latest pharoVM:
        http://files.pharo.org/get-files/90/pharo64-linux-stable.zip
pharo-vm/pharo
Creating starter scripts pharo and pharo-ui

$ ./pharo --version
5.0-202002121043  Wed Feb 12 11:06:45 UTC 2020 gcc 5.4.0 [Production Spur 64-bit VM]
CoInterpreter * VMMaker-CompatibleUserName.1580983506 uuid: 7aff73cb-5a2e-5002-a356-37de4e762a49 Feb 12 2020
StackToRegisterMappingCogit * VMMaker-CompatibleUserName.1580983506 uuid: 7aff73cb-5a2e-5002-a356-37de4e762a49 Feb 12 2020
VM: 202002121043 https://github.com/pharo-project/opensmalltalk-vm.git
Date: Wed Feb 12 11:43:20 2020 CommitHash: 52202d8
Plugins: 202002121043 https://github.com/pharo-project/opensmalltalk-vm.git
Linux travis-job-93347cf3-9798-4672-8c23-706b9ceb049b 4.15.0-1028-gcp #29~16.04.1-Ubuntu SMP Tue Feb 12 16:31:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
plugin path: /home/t3/tmp/pharo/pharo-vm/lib/pharo/5.0-202002121043 [default: /home/t3/tmp/pharo/pharo-vm/lib/pharo/5.0-202002121043/]

$ ./pharo Pharo.image printVersion
[version] 'Pharo9.0.0' 'Pharo-9.0.0+build.1343.sha.7b1f2ac8e896d2b755451d8e00686a290240fde5 (64 Bit)'

$ ./pharo Pharo.image eval "(ZnClient new url: 'https://pharo.org/web/files/pharo.png'; get; response) contentType"
image/png

$ ./pharo Pharo.image eval ZdcPluginSSLSession new
a ZdcPluginSSLSession

You could try to use ldd to try to figure out if you have any missing libraries.

Sven

> On 20 Apr 2021, at 23:22, Petter <[hidden email]> wrote:
>
> Hi, I have trouble with latest Fedora 33, plain installation and Pharo 8.0
> stable, 64 bit.
>
> When I try a
>
> ZnClient new url: 'https://something..'; get.
>
> The image segfaults.
>
> Last lines from log are:
>
> primitiveSSL:setStringProperty:toValue:
> atAllPut:
> atAllPut:
> primitiveSSL:connect:startingAt:count:into:
>
> stack page bytes 8192 available headroom 5576 minimum unused headroom 5952
>
> ---
>
> It seems libssl and libcrypto is bundled togheter with Pharo, looks like
> version 1.0.0.
>
> I then try to compile openssl with 1.0.0-stable which I build myself, but
> when replacing the Pharo-libs with my own I get the message that I am using
> a too old tls-version error.
>
> I am a little confused on what is happening here. Do anyone have a clue?
>
> (git checkouts over ssh works fine, strange enough)
>
> Petter
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Reply | Threaded
Open this post in threaded view
|

Re: Segfault with ZnClient and https

Sven Van Caekenberghe-2


> On 21 Apr 2021, at 09:46, Sven Van Caekenberghe <[hidden email]> wrote:
>
> $ ./pharo Pharo.image eval "(ZnClient new url: 'https://pharo.org/web/files/pharo.png'; get; response) contentType"
> image/png

Actually, this is nicer, simpler and clearer:

$ ./pharo Pharo.image eval "ZnClient new get: 'https://pharo.org/web/files/pharo.png'; response"
a ZnResponse(200 OK image/png 34696B)
Reply | Threaded
Open this post in threaded view
|

Re: Segfault with ZnClient and https

Petter
Hi Sven and thanks for answering!

I did try a ldd and all libraries are present. I also started pharo with gdb
and it seems problem is somewhere in the combination between libgit2.so,
libssl.so and libcrypto.so.1.0.0, most often the crash comes from libssl.so.

Exchanging libgit2.so with the os-version make ZnClient work, but then
Iceberg on the other hand stops working.

I pretty much gave up Fedora and reverted to safe Ubuntu. Maybe I can dig
deeper into this later, but we are pretty close to a production setting now
:)

Petter



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html