The futex implementation seems to have problems

I saw when trying to run rustc:

I tested on the Gentoo image and the Bianbu image to exclude unexpected problems in the userspace, the only common part is the kernel:

For the Bianbu image:

apt update && apt install curl
curl --proto '=https' --tlsv1.2 -sSf | sh
. "$HOME/.cargo/env"
cargo install starship (or any other crate)

what‘s the problem have you encountered?the cargo command does not work well?

I can produce a better backtrace, but it boils down to a call to syscall(SYS_futex) ending up with a segfault.

You may try locally and you should reproduce it, I hadn’t had time to run further tests.

I tested on a musl system instead of glibc and everything works seems working as intended.

Digging further it seems a kernel bug that got fixed in 6.6 217923 – [bisected][regression] rustc userspace crashes on riscv in kernel 6.5 (thanks to bjorn3 for pointing it out)