adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
530 stars 125 forks source link

Abort trap: 6 on loading SSL libraries on macOS #323

Closed zorael closed 2 years ago

zorael commented 2 years ago

macOS Catalina 10.15.7, dmd 2.099.1.

When calling HttpResponse.waitForCompletion() with an https:// Uri, the program exits with SIGABRT. Normal http:// connections work fine.

I did a lot of printf debugging (wtb gdb) and narrowed it down to loadOpenSsl dlopening libssl.dylib.

https://github.com/adamdruppe/arsd/blob/79b630e5474e42f44a412a3502d9496df359da73/http2.d#L3255-L3263

If I change it to load libssl.46.dylib it works fine. Incidentally this is what dlang-requests loads.

https://github.com/ikod/dlang-requests/blob/80cef928eda44a61c2bd575c989116bb2061f7c4/source/requests/ssl_adapter.d#L61-L76

These are the libssl* dylibs available on this machine:

$ ls /usr/lib/libssl*
/usr/lib/libssl.0.9.7.dylib /usr/lib/libssl.43.dylib    /usr/lib/libssl.dylib
/usr/lib/libssl.0.9.8.dylib /usr/lib/libssl.44.dylib
/usr/lib/libssl.35.dylib    /usr/lib/libssl.46.dylib

I don't know the first thing about macs, so I wouldn't be surprised if this is just user error.

adamdruppe commented 2 years ago

huh this used to work, probably they updated a version and it broke. but yeah doing the list like requests prolly a solution

i just tagged somethign a second ago but we can ptu it in that way

adamdruppe commented 2 years ago

shoudl be fixed with your pr if you wanna retest then we can close.

my old mac laptop died on me, beeps bad ram, so i can't retest there but i'll redo my windows and linux tests shortly, by eyeball though it should be perfectly fine

zorael commented 2 years ago

I tested it briefly on all three machines and it seems to work. Mind that the mac seems to be far from up to date, so it may be that newer versions have newer so-names. (I can't upgrade the machine since I don't know enough mac to fix it if it breaks, and it needs to work.)