Open yosifkit opened 2 weeks ago
Options:
Good news! It segfaults in system emulation too!!
Hmm, package/uclibc
(which is where our uClibc version comes from: https://github.com/buildroot/buildroot/blob/2024.02.3/package/uclibc/uclibc.hash) didn't change between 2024.02.2 and 2024.02.3, so while the segfault clearly exhibits somewhere in uClibc, it's probably not caused by uClibc.
This seems like a more likely candidate: (https://github.com/buildroot/buildroot/commit/5d9c54de0c48be3a616db5e3c2f6c7112ff635bf)
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 5061a603bc..964fbc97df 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -6,8 +6,8 @@ sha512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3c
sha512 a5018bf1f1fa25ddf33f46e720675d261987763db48e7a5fdf4c26d3150a8abcb82fdc413402df1c32f2e6b057d9bae6bdfa026defc4030e10144a8532e60f14 gcc-11.4.0.tar.xz
# From https://gcc.gnu.org/pub/gcc/releases/gcc-12.3.0/sha512.sum
sha512 8fb799dfa2e5de5284edf8f821e3d40c2781e4c570f5adfdb1ca0671fcae3fb7f794ea783e80f01ec7bfbf912ca508e478bd749b2755c2c14e4055648146c204 gcc-12.3.0.tar.xz
-# From https://gcc.gnu.org/pub/gcc/releases/gcc-13.2.0/sha512.sum
-sha512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2 gcc-13.2.0.tar.xz
+# From https://gcc.gnu.org/pub/gcc/releases/gcc-13.3.0/sha512.sum
+sha512 ed5f2f4c6ed2c796fcf2c93707159e9dbd3ddb1ba063d549804dd68cdabbb6d550985ae1c8465ae9a336cfe29274a6eb0f42e21924360574ebd8e5d5c7c9a801 gcc-13.3.0.tar.xz
# Locally calculated (fetched from Github)
sha512 4dca20f517a42bb027fec605965b09fb917a535eebf3fe3e811d93476b02b1962df5ad4665f117bd44c2ec8e8015d51a44c00591761fe5f259c201ac5c7d920f gcc-arc-2023.09-release.tar.gz
Oh, that was a dead end -- the default is gcc-12, not gcc-13, so we get 12.3.0 with or without that patch. :facepalm:
In the pursuit of further narrowing things down, the upgrade from kernel headers 6.6.22 to 6.6.32 is also not the culprit.
https://github.com/buildroot/buildroot/commit/a27009724737e381414d235b7aba3f43cb1f7dd1 is another dead-end (it was a long shot, but I'm running out of promising things in git diff 2024.02.2..2024.02.3
:sob:)
Well, the reason I felt like buildroot was gaslighting me was because I was gaslighting myself. I can reproduce the segfault on 2024.02.2 as well. :sob:
Confirmed, the current published busybox:uclibc
image segfaults too. :face_exhaling:
Edit: * on native riscv64 hardware
Also segfaulting (thanks to repo-info
):
busybox@sha256:550a3dba1de5d4598fcb6ef9dbb7953b21166ef3f1bae1400e36aa58a2bf22bf
is 2024.02.1busybox@sha256:9b820d1fb7c0d72dc25bf71e8ea6e1e690e3a2751610e4481a5e7372ae7dc8a3
is 2024.02.0busybox@sha256:f681eed9b2db497321012a47fa83f50edccb5ae789b07dea2e608e81e05f5899
is 2023.11.1busybox@sha256:41af629cfa908c7ed7550db6a260c79d6dd55fe4996d7481595e3d547ab829c9
is the last build before OCI importsbusybox@sha256:0187895b668a1225646bb3454d3373ee8f35bb2122a1d0fda61add9e1a5a5e8b
busybox@sha256:d7817958f6c97c4df87a48a2f619e8f8bb22f7294e42f2554000565c67cafd77
busybox@sha256:cb012a73b8b1b2f8485adcaef1ecd4b3576d0cc2bd5f361a88aed35be30e82eb
is the last build before meta-scripts / buildkit (so same exact rootfs as the previous build)busybox@sha256:1411f4a8c78f5fadafa8f733e71f6ff01dfd637263ae090d68511a6e152451e3
busybox@sha256:1bc902c78702c7852f15ef579b1609f215915c5a670de1abd8f16a00a8997625
busybox@sha256:e3012943882fb37a7847d6127d82984f212d1606754a9f72d0a04757c9197524
busybox@sha256:5a43a82d5e4a8f1a827c0bb63648460af4e6a9f3c95a039c446614045a695b84
is the very first one we ever pushed, and it ... segfaults too :sob:In better news, busybox:glibc
and busybox:musl
are both fine, so we could just disable our riscv64 builds of uclibc
and call it good, but it should be supported. :sob:
I should also clarify that this isn't just nslookup
-- running the interactive shell segfaults reliably for me as well.
As discovered in https://github.com/docker-library/busybox/pull/202,
busybox
segfaults when running on realriscv64
hardware but works fine on QEMU ðŸ˜. Just opening this as a tracking issue.Originally posted by @tianon in https://github.com/docker-library/busybox/issues/202#issuecomment-2163880467