commit f13fb81ad3159543741e9132685335002a6d5df2 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 25 14:04:37 2021 -0300 linux: Remove /proc/cpuinfo fallback on alpha and sparc introduced in glibc 2.34 also removed generic /proc/cpuinfo fallback (sysdeps/unix/sysv/linux/getsysstats.c change). That causes breakage with openjdk 8 and 9 (and variants like icedtea) when no sysfs is mounted (two my cases where this got visible was chroot()ed system and linux vserver guest). openjdk assumes then that system is uniprocessor, disables MP things in virtual machine and even simple "java --help" gets stuck on futex operations. openjdk sources: hotspot/src/os/linux/vm/os_linux.cpp for number of cpus checking hotspot/src/share/vm/runtime/globals.hpp for AssumeMP Newer openjdk like 11 defaults to multi processor, so the bug doesn't happen there. Easy reproducer by Jan Palus: systemd-run --wait -t -p InaccessiblePaths=/sys /usr/lib64/jvm/openjdk8/bin/java -version (needs 1-15 runs) Bisecting confirms: f13fb81ad3159543741e9132685335002a6d5df2 is the first bad commit commit f13fb81ad3159543741e9132685335002a6d5df2 Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 25 14:04:37 2021 -0300 linux: Remove /proc/cpuinfo fallback on alpha and sparc There is no much gain in fallback to cpuinfo if sysfs is no present, usually on restricted environment neither will be present. It also simplifies the code and make all architecture use the sched_getaffinity as the sysfs fallback. Checked on sparc64-linux-gnu. sysdeps/unix/sysv/linux/alpha/getsysstats.c | 38 ----------------------------- sysdeps/unix/sysv/linux/getsysstats.c | 22 +---------------- sysdeps/unix/sysv/linux/sparc/getsysstats.c | 38 ----------------------------- 3 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/alpha/getsysstats.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/getsysstats.c
Fixed on 2.35.
I backported to 2.34 as well.
Sorry, I didn't see this bug in time. The bug here is that the /sys code returns a uniprocessor if /sys is not available. Then then /proc fallback is no longer needed. A mounted /sys is more or less required these days.