Fwd: [bisected][regression] rustc userspace crashes on riscv in kernel 6.5

From: Bagas Sanjaya
Date: Thu Sep 21 2023 - 20:02:23 EST


Hi,

I notice a regression report on Bugzilla [1]. Quoting from it:


> Since this commit:
>
> commit 8ee0b41898fa26f66e32237f179b6989c65600d6
> Author: Greentime Hu <greentime.hu@xxxxxxxxxx>
> Date: Mon Jun 5 11:07:11 2023 +0000
>
> riscv: signal: Add sigcontext save/restore for vector
>
> running rustc on riscv produces output like this:
>
> $ rustc test.rs
> /usr/lib/rust/lib/librustc_driver-f0248bec779deb29.so(+0xe8ebdc)[0x3f8dc8ebdc]
> linux-vdso.so.1(__vdso_rt_sigreturn+0x0)[0x3f8fb91800]
> /lib64/libc.so.6(syscall+0x16)[0x3f8cbfacbe]
> /usr/lib/rust/lib/libstd-985e4b663b8154c3.so(_ZN3std3sys4unix5locks13futex_condvar7Condvar4wait17h4e3b669d2690824dE+0x64)[0x3f8cd45f68]
> /usr/lib/rust/lib/librustc_driver-f0248bec779deb29.so(+0x715ab6)[0x3f8d515ab6]
> /usr/lib/rust/lib/librustc_driver-f0248bec779deb29.so(+0x7159ce)[0x3f8d5159ce]
> /usr/lib/rust/lib/librustc_driver-f0248bec779deb29.so(+0x6b64f6)[0x3f8d4b64f6]
> /usr/lib/rust/lib/librustc_driver-f0248bec779deb29.so(+0x715534)[0x3f8d515534]
> /usr/lib/rust/lib/libstd-985e4b663b8154c3.so(rust_metadata_std_9e9c65f710e3ce43+0xaba32)[0x3f8cd44a32]
> /lib64/libc.so.6(+0x6a8e4)[0x3f8cbab8e4]
> /lib64/libc.so.6(+0xbb49c)[0x3f8cbfc49c]
>
> even for a simple hello world program. The output being present does not necessarily mean that the compilation failed, in fact often it will still return 0 and produce a working binary despite the output, but often it does not, frequently enough that it's impossible to build large rust packages. See the attached log for an example of a real build which fails partway through (despite the fact that all compilation lines emit the traceback).

See Bugzilla for the full thread and attached rust build log.

The reporter (Cc'ed) confirms that this regression occurs on all rust toolchain
distributions (both from the distro and from rustup (maybe?)).

Anyway, I'm adding it to regzbot:

#regzbot introduced: 8ee0b41898fa26 https://bugzilla.kernel.org/show_bug.cgi?id=217923

Thanks.

[1]: https://bugzilla.kernel.org/show_bug.cgi?id=217923

--
An old man doll... just what I always wanted! - Clara