crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.5k stars 1.62k forks source link

OpenSSL Error on ARM, in a fibre #11987

Open HCLarsen opened 2 years ago

HCLarsen commented 2 years ago

This is very similar to the previous fixed issue #10040.

The line of code is this:

HTTP::Client.get("https://api.openweathermap.org/data/2.5/weather?appid=NOTAREALKEY")

And it generates the error:

Error OpenSSL::SSL::Error - SSL_connect: error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac

The error only happens for this specific URI domain, when it's cross compiled and run on my Raspberry Pi, when the line is inside a fibre instead of the main event loop, and when it's compiled with the --release flag. I was also able to prevent it by putting a puts command on the line directly before it.

I also didn't start testing this line until after I upgrade to Crystal 1.4, so I don't know if this bug was present in previous compiler versions.

rdp commented 2 years ago

Wonder if related to #7978?

HCLarsen commented 2 years ago

Doubtful. This issue is related to OpenSSL, while that's about formatting float numbers.