-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python 3.12 hashlib broken on arm64 #33218
Comments
FWIW, python 3.13 does not exhibit this behavior, it works fine. I've just switched to python 3.13 for the short term. |
Can you check if you have the latest Wolfi-base |
@ibuildthecloud did you re-pull latest cgr.dev/chainguard/wolfi-base? (no cache, to get openssl 3.4.0) as I expect sha256 to be always available..... from openssl...... which is where python gets those hash implementations from.... But will retest all combinations too. |
I reproduced exactly the above error locally. Then a The wolfi-base I had cached locally was
|
libssl3 and libcrypto3 are backwards compatible, but not forwards compatible. This is easiest to demonstrate with just the openssl command in the base image that @smoser posted $ docker run --rm -ti --entrypoint sh cgr.dev/chainguard/wolfi-base@sha256:d6b37317ae7cb5c0864189e9e5acd825386ae226a413e7c19370f5f87d150f92
/ # apk add openssl~3.0
fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
(1/1) Installing openssl (3.0.7-r3)
WARNING: Support for packages with multiple data parts will be dropped in apk-tools 3.
OK: 16 MiB in 15 packages
/ # openssl version
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.3.1 4 Jun 2024)
/ # apk add openssl~3.1
(1/2) Installing openssl-provider-legacy (3.4.0-r1)
(2/2) Upgrading openssl (3.0.7-r3 -> 3.1.4-r1)
OK: 16 MiB in 16 packages
/ # openssl version
OpenSSL 3.1.4 24 Oct 2023 (Library: OpenSSL 3.3.1 4 Jun 2024)
/ # apk add openssl~3.2
(1/1) Upgrading openssl (3.1.4-r1 -> 3.2.1-r0)
OK: 16 MiB in 16 packages
/ # openssl version
OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.3.1 4 Jun 2024)
/ # apk add openssl~3.3
(1/1) Upgrading openssl (3.2.1-r0 -> 3.3.2-r2)
OK: 16 MiB in 16 packages
/ # openssl version
OpenSSL 3.3.2 3 Sep 2024 (Library: OpenSSL 3.3.1 4 Jun 2024)
/ # apk add openssl~3.4
(1/1) Upgrading openssl (3.3.2-r2 -> 3.4.0-r1)
OK: 16 MiB in 16 packages
/ # openssl version
openssl: /usr/lib/libssl.so.3: version `OPENSSL_3.4.0' not found (required by openssl)
openssl: /usr/lib/libcrypto.so.3: version `OPENSSL_3.4.0' not found (required by openssl)
/ # apk add -u libcrypto3 libssl3
(1/2) Upgrading libcrypto3 (3.3.1-r4 -> 3.4.0-r1)
(2/2) Upgrading libssl3 (3.3.1-r4 -> 3.4.0-r1)
OK: 15 MiB in 16 packages
/ # openssl version
OpenSSL 3.4.0 22 Oct 2024 (Library: OpenSSL 3.4.0 22 Oct 2024)
/ # exit 0 As you can see openssl binary 3.0 through to 3.3 work correctly against 3.3.1 libraries. Unfortunately, with python the runtime traceback is incomprehensible, to understand that libcrypto/libssl is out of date in the image. The solution is to either upgrade the libcrypto3 and libssl3; or to pull a newer base image. @ibuildthecloud Can you please confirm that executing |
To make this better in the future, opened melange issue chainguard-dev/melange#1621 |
If you run the following Dockerfile you'll see that python3.12 on arm64 hashlib is somehow broken.
Output
The text was updated successfully, but these errors were encountered: