On Tue, 30 Jul 2019, Andreas Schwab wrote: > On Jul 30 2019, David Abdurachmanov wrote: > > > On Mon, Jul 29, 2019 at 1:51 PM Andreas Schwab wrote: > >> > >> Since switching to 5.2 kernels I'm seeing random crashes and > >> misbehaviors on the HiFive, for example while building gcc or glibc. > >> Perhaps missing TLB flushes? > > > > Do you have some examples of crashes? > > While building glibc: > > an_ES.UTF-8...realloc(): invalid pointer > /bin/sh: line 1: 7841 Aborted (core dumped) I18NPATH=. GCONV_PATH=/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/iconvdata LC_ALL=C /home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/elf/ld-linux-riscv64-lp64d.so.1 --library-path /home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/math:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/elf:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/dlfcn:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/nss:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/nis:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/rt:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/resolv:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/mathvec:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/support:/home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/nptl /home/abuild/rpmbuild/BUILD/glibc-2.29/cc-base/locale/localedef $flags --alias-file=../intl/locale.alias -i locales/$input -f charmaps/$charset --prefix=/home/abuild/rpmbuild/BUILDROOT/glibc-2.29-0.riscv64 $locale > make[2]: *** [Makefile:422: install-archive-an_ES.UTF-8/UTF-8] Error 134 > > While building gcc: > > ../../gcc/ada/exp_aggr.adb: In function 'Exp_Aggr.Expand_N_Aggregate': > ../../gcc/ada/exp_aggr.adb:5311:21: warning: 'Csiz' may be used uninitialized in this function [-Wmaybe-uninitialized] > ../../gcc/ada/exp_aggr.adb:5220:10: note: 'Csiz' was declared here > +===========================GNAT BUG DETECTED==============================+ > | 10.0.0 20190727 (experimental) [trunk revision 273844] (riscv64-suse-linux) | > | Storage_Error stack overflow or erroneous memory access | > | Error detected at output.ads:39:8 | > realloc(): invalid pointer I personally haven't seen these issues; but then again, I haven't done any glibc or gcc builds on v5.2. Will take a closer look. Reflecting on the recent commits, there weren't too many recent RISC-V-specific changes that could have an impact here. So if these problems are relatively repeatable, and they didn't happen with v5.1, there are a few patches that might be worth reverting to see if the situation improves. Here would be my short list: - Commit bf587caae305ae3b4393077fb22c98478ee55755 ("riscv: mm: synchronize MMU after pte change") - Commit 6dd91e0eacff0a5c822ca37565d6b5740c4d2a80 ("RISC-V: defconfig: Enable NO_HZ_IDLE and HIGH_RES_TIMERS") - Commit 671f9a3e2e24cdeb2d2856abee7422f093e23e29 ("RISC-V: Setup initial page tables in two stages") Of course, it's also possible that someone could have made a change outside arch/riscv that are causing these problems. If that's the case, we're probably stuck bisecting it. - Paul