From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D8ED3858427; Wed, 24 Nov 2021 21:58:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D8ED3858427 From: "arekm at maven dot pl" To: glibc-bugs@sourceware.org Subject: [Bug libc/28624] New: openjdk 8/9 assume uni processor and gets stuck due to lack of cpu counting /proc fallback with glibc 2.34 Date: Wed, 24 Nov 2021 21:58:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.34 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arekm at maven dot pl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 21:58:27 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28624 Bug ID: 28624 Summary: openjdk 8/9 assume uni processor and gets stuck due to lack of cpu counting /proc fallback with glibc 2.34 Product: glibc Version: 2.34 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: arekm at maven dot pl CC: drepper.fsp at gmail dot com Target Milestone: --- commit f13fb81ad3159543741e9132685335002a6d5df2 Author: Adhemerval Zanella 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 st= uck 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=3D/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 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=