sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.04k stars 280 forks source link

2.35-r0: Illegal instruction #177

Closed 2096779623 closed 1 year ago

2096779623 commented 2 years ago
localhost:~# wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
localhost:~# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
--2022-03-19 11:36:40--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/a2b85cd2-b74d-4d3b-bf3e-a8e29636c2f9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220319%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220319T033642Z&X-Amz-Expires=300&X-Amz-Signature=ca2bec06f5b9220b02a5a37dc16c13bd291b6934b25edcf8267c43db78479354&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-2.35-r0.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2022-03-19 11:36:41--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/a2b85cd2-b74d-4d3b-bf3e-a8e29636c2f9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220319%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220319T033642Z&X-Amz-Expires=300&X-Amz-Signature=ca2bec06f5b9220b02a5a37dc16c13bd291b6934b25edcf8267c43db78479354&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-2.35-r0.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2826421 (2.7M) [application/vnd.android.package-archive]
Saving to: 'glibc-2.35-r0.apk'

glibc-2.35-r0.apk                                            100%[===========================================================================================================================================>]   2.70M  3.80MB/s    in 0.7s    

2022-03-19 11:36:43 (3.80 MB/s) - 'glibc-2.35-r0.apk' saved [2826421/2826421]

localhost:~# apk add glibc-2.35-r0.apk 
(1/1) Installing glibc (2.35-r0)
OK: 93 MiB in 116 packages
localhost:~# rm glibc-2.35-r0.apk 
localhost:~# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
--2022-03-19 11:37:00--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/bdd42ae7-8b95-4538-821b-e79b0c376155?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220319%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220319T033702Z&X-Amz-Expires=300&X-Amz-Signature=877c15cf027e22bb4f48e12a38d12e3098ecbcfa893a3b4c864b8c89b4781bd7&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-bin-2.35-r0.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2022-03-19 11:37:01--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/bdd42ae7-8b95-4538-821b-e79b0c376155?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220319%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220319T033702Z&X-Amz-Expires=300&X-Amz-Signature=877c15cf027e22bb4f48e12a38d12e3098ecbcfa893a3b4c864b8c89b4781bd7&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-bin-2.35-r0.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1270079 (1.2M) [application/vnd.android.package-archive]
Saving to: 'glibc-bin-2.35-r0.apk'

glibc-bin-2.35-r0.apk                                        100%[===========================================================================================================================================>]   1.21M  1.81MB/s    in 0.7s    

2022-03-19 11:37:03 (1.81 MB/s) - 'glibc-bin-2.35-r0.apk' saved [1270079/1270079]

localhost:~# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
--2022-03-19 11:37:06--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... ^C
localhost:~# wget https://hub.fastgit.xyz/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
--2022-03-19 11:37:22--  https://hub.fastgit.xyz/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
Resolving hub.fastgit.xyz (hub.fastgit.xyz)... 89.31.125.6
Connecting to hub.fastgit.xyz (hub.fastgit.xyz)|89.31.125.6|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.fastgit.org/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk [following]
--2022-03-19 11:37:32--  https://download.fastgit.org/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-i18n-2.35-r0.apk
Resolving download.fastgit.org (download.fastgit.org)... 89.31.125.6
Connecting to download.fastgit.org (download.fastgit.org)|89.31.125.6|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7748981 (7.4M) [application/vnd.android.package-archive]
Saving to: 'glibc-i18n-2.35-r0.apk'

glibc-i18n-2.35-r0.apk                                       100%[===========================================================================================================================================>]   7.39M   314KB/s    in 26s     

2022-03-19 11:38:16 (286 KB/s) - 'glibc-i18n-2.35-r0.apk' saved [7748981/7748981]

localhost:~# ls
glibc-bin-2.35-r0.apk  glibc-i18n-2.35-r0.apk
localhost:~# apk add *
(1/3) Installing libc6-compat (1.2.2-r7)
(2/3) Installing glibc-bin (2.35-r0)
(3/3) Installing glibc-i18n (2.35-r0)
Executing glibc-bin-2.35-r0.trigger
Illegal instruction
ERROR: glibc-bin-2.35-r0.trigger: script exited with error 132
OK: 122 MiB in 119 packages

image

localhost:~# cat /etc/apk/repositories 
https://mirrors.ustc.edu.cn/alpine/v3.15/main
https://mirrors.ustc.edu.cn/alpine/v3.15/community
sgerrand commented 1 year ago

@2096779623: Would you please provide a minimal example Dockerfile which demonstrates the problem you're experiencing it. Without that I am unable to investigate this matter further.

2096779623 commented 1 year ago
localhost:~# wget https://github.com/sgerrand/alpine-pkg
-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
--2023-04-14 04:23:34--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... Read error (Connection aborted) in headers.
Retrying.

--2023-04-14 04:23:44--  (try: 2)  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/fe616ff3-e5d8-4abd-8a89-d4c629a36826?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042344Z&X-Amz-Expires=300&X-Amz-Signature=08f504c31547b210230a18719089b9e060d20fe2381a6215bf0a31aba7e4bbe8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2023-04-14 04:23:46--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/fe616ff3-e5d8-4abd-8a89-d4c629a36826?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042344Z&X-Amz-Expires=300&X-Amz-Signature=08f504c31547b210230a18719089b9e060d20fe2381a6215bf0a31aba7e4bbe8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2826689 (2.7M) [application/vnd.android.package-archive]
Saving to: 'glibc-2.35-r1.apk'

glibc-2.35-r1 100%   2.70M   464KB/s    in 8.9s

2023-04-14 04:24:00 (309 KB/s) - 'glibc-2.35-r1.apk' saved [2826689/2826689]

localhost:~# apk add glibc-2.35-r1.apk
(1/1) Installing glibc (2.35-r1)
OK: 51 MiB in 29 packages
localhost:~# wget https://github.com/sgerrand/alpine-pkg
-glibc/releases/download/2.35-r1/glibc-bin-2.35-r1.apk
--2023-04-14 04:24:14--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-bin-2.35-r1.apk
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/06b18f30-7fe9-4ab9-8e8a-19c7be5641cb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042420Z&X-Amz-Expires=300&X-Amz-Signature=70d701f25c0482e01c2bc53d20ca6df0cbfc91d8a820e1336bac8e09f703b01b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-bin-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2023-04-14 04:24:23--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/06b18f30-7fe9-4ab9-8e8a-19c7be5641cb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042420Z&X-Amz-Expires=300&X-Amz-Signature=70d701f25c0482e01c2bc53d20ca6df0cbfc91d8a820e1336bac8e09f703b01b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-bin-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1269993 (1.2M) [application/vnd.android.package-archive]
Saving to: 'glibc-bin-2.35-r1.apk'

glibc-bin-2.3 100%   1.21M   797KB/s    in 1.6s

2023-04-14 04:24:29 (797 KB/s) - 'glibc-bin-2.35-r1.apk' saved [1269993/1269993]

localhost:~# wget https://github.com/sgerrand/alpine-pkg
-glibc/releases/download/2.35-r1/glibc-i18n-2.35-r1.apk
--2023-04-14 04:24:29--  https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-i18n-2.35-r1.apk
Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/b6d18441-a4f0-4418-92a3-f063c78d8e92?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042431Z&X-Amz-Expires=300&X-Amz-Signature=3838a056d07e2439958f2839c5dfab7e239d9f086cf2f2c3144698734be13dd0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-i18n-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2023-04-14 04:24:33--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/33333969/b6d18441-a4f0-4418-92a3-f063c78d8e92?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230414%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230414T042431Z&X-Amz-Expires=300&X-Amz-Signature=3838a056d07e2439958f2839c5dfab7e239d9f086cf2f2c3144698734be13dd0&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=33333969&response-content-disposition=attachment%3B%20filename%3Dglibc-i18n-2.35-r1.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7748926 (7.4M) [application/vnd.android.package-archive]
Saving to: 'glibc-i18n-2.35-r1.apk'

glibc-i18n-2. 100%   7.39M   588KB/s    in 15s

2023-04-14 04:24:52 (504 KB/s) - 'glibc-i18n-2.35-r1.apk' saved [7748926/7748926]

localhost:~# apk add glibc-bin-2.35-r1.apk glibc-i18n-2.
35-r1.apk
(1/7) Upgrading musl (1.2.3-r4 -> 1.2.3_git20230322-r3)
(2/7) Installing readline (8.2.1-r1)
(3/7) Installing bash (5.2.15-r3)
Executing bash-5.2.15-r3.post-install
(4/7) Installing libc6-compat (1.2.3_git20230322-r3)
(5/7) Installing libgcc (12.2.1_git20220924-r10)
(6/7) Installing glibc-bin (2.35-r1)
(7/7) Installing glibc-i18n (2.35-r1)
Executing busybox-1.36.0-r5.trigger
Executing glibc-bin-2.35-r1.trigger
Illegal instruction
ERROR: glibc-bin-2.35-r1.trigger: script exited with error 132
OK: 84 MiB in 35 packages
localhost:~# /usr/glibc-compat/bin/localedef -i en_US -f
 UTF-8 en_US.UTF-8
Illegal instruction
localhost:~# strace /usr/glibc-compat/bin/localedef -i en_US -f
proot warning: ptrace request 'PTRACE_???' not supported yet
execve("/usr/glibc-compat/bin/localedef", ["/usr/glibc-compat/bin/localedef", "-i", "en_US", "-f", "UTF-8", "en_US.UTF-8"], 0x7fdd3f3678 /* 25 vars */) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x3f0001d9b0} ---
+++ killed by SIGILL +++
Illegal instruction
localhost:~#

This is the problem of proot, close this issue now.

sgerrand commented 1 year ago

The reason for asking for a Dockerfile was to see what other packages you have installed on that system. I can see via your screenshot that there's 120 packages installed, I just don't know what they are. Without knowing what's installed, it's hard for me to debug what the cause of the "Illegal instruction" is as I can't reproduce this in Alpine 3.15 - 3.17 via Docker.

If you do have any more information to share about the packages and you'd like me to continue investigating the cause of this error, please post that here.