Closed actualben closed 1 year ago
Helpful people on the busybox mailing list report that @ncopa previously reported this months ago: http://lists.busybox.net/pipermail/busybox/2023-January/090113.html.
alice reports:
it's caused by having a cpu with AVX512 (the github runners do) but not sha_ni, and the code that checks it is broken and misdetects sha_ni support when avx512 exists. the github runners don't have sha_ni, so it breaks exactly there.
quite the rare combo :)
@ncopa said:
I did try to create a fix for it: https://github.com/ncopa/busybox/commit/e4ad5e7f2fed8e36d0779d918052169fe9a0bb95 But it didn't work. I was unable to create a proper core dump and sort of gave up. In Alpine we have simply disabled the HWACCEL as it is broken.
So I think we should also disable HWACCEL in the docker library busybox until a proper fix can be committed upstream.
Alice's patch disabling HWACCEL in alpine's busybox is here: https://git.alpinelinux.org/aports/commit/main?id=ae2cfdf6f6da3dc46ee09d8ceafa26921f6e058e
See https://bugs.busybox.net/show_bug.cgi?id=15236 for where this was also reported in the upstream bugtracker.
I have been able to reproduce
sha256sum
crashes in all three of these images:busybox:1.36-{musl,uclibc,glibc}
but not in earlier versions -- and I tested back to 1.33. I can produce the crash by running in github actions jobs on github hosted runners - I cannot reproduce this on arm nor in qemu emulating amd64. The crash is only intermittent for me.An example of a crashy (on github actions) Dockerfile is this:
Despite the repo name I don't yet have any evidence that avx is involvedstrace looks like this:
gdb on the core dump starts with:
layout asm
then shows0×401161 or (%rax),%al
(but I don't really know what I'm doing in there).