From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mathieu Othacehe Newsgroups: gmane.lisp.guile.bugs Subject: bug#52646: GC thread freeze Date: Sat, 18 Dec 2021 21:52:30 +0100 Message-ID: <878rwhbppt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1376"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: 52646@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Dec 18 21:54:35 2021 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mygiw-0000Al-6o for guile-bugs@m.gmane-mx.org; Sat, 18 Dec 2021 21:54:34 +0100 Original-Received: from localhost ([::1]:57130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mygiv-0002M0-8B for guile-bugs@m.gmane-mx.org; Sat, 18 Dec 2021 15:54:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myghT-00008F-7b for bug-guile@gnu.org; Sat, 18 Dec 2021 15:53:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60956) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myghS-0004Dc-JL for bug-guile@gnu.org; Sat, 18 Dec 2021 15:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myghS-0004xq-IT for bug-guile@gnu.org; Sat, 18 Dec 2021 15:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 18 Dec 2021 20:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52646 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163986075719042 (code B ref -1); Sat, 18 Dec 2021 20:53:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Dec 2021 20:52:37 +0000 Original-Received: from localhost ([127.0.0.1]:44269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mygh3-0004x4-A8 for submit@debbugs.gnu.org; Sat, 18 Dec 2021 15:52:37 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mygh1-0004ww-2M for submit@debbugs.gnu.org; Sat, 18 Dec 2021 15:52:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myggz-00089F-FD for bug-guile@gnu.org; Sat, 18 Dec 2021 15:52:34 -0500 Original-Received: from [2001:470:142:3::e] (port=38898 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myggz-00047j-7R for bug-guile@gnu.org; Sat, 18 Dec 2021 15:52:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=ojtgPcImAWSdEucuTEB+77vgiLtFRZDbqDa5KNqBjs4=; b=Mbjo8sTqytMdr8 hr+n9/qhmVGnaIal1iPKgWw9ojAW4Xdpq35BJYHjwvtYLJUD+VQUdcAOgyyuhw6KoX5lYVqEFICP2 H/tn++RIJrV+Sor5R4qPTczG4eElx4AjdcGOydHoWi+3E6bywyVX7/VJNRCwqYkRuRCgKRj6kaM+b xx74oqi382QtjrgY45SvQsbjya7uhboW7xnjyIxRhhCyf6LH52TINp5UmNiYmR4TaJWCjT2yL1V4F 2pg83Nc4vzpCgaNcWDfKqUrZVWH+aNtMHJ+kJIFpkttOt4RnLtFowDzhqynG0TpRnWOjgP+SSGhBZ NTx5BqVxvMnTPc2QOXlw==; Original-Received: from [2a01:e0a:19b:d9a0:45b5:a14a:5c75:5737] (port=54116 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myggy-0004x3-Qd for bug-guile@gnu.org; Sat, 18 Dec 2021 15:52:33 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:10225 Archived-At: Hello, I experiment a strange behaviour with this Guile 3.0.7 process: https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/tree/src/cuirass/scripts/remote-worker.scm. The process is forking N processes that in turn start 4 threads. On aarch64 machines specifically, some of those threads are freezing. Here is what GDB is reporting: --8<---------------cut here---------------start------------->8--- (gdb) attach 5660 ;frozen cuirass-remote-worker PID (gdb) info thr Id Target Id Frame * 1 Thread 0xffffafd32e20 (LWP 5660) "yHg3r3fS" 0x0000ffffafb3fa80 in do_futex_wait.constprop () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libpthread.so.0 2 Thread 0xffffa6c1c1d0 (LWP 5666) "ZMQbg/Reaper" 0x0000ffffaf7ec294 in epoll_pwait () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 3 Thread 0xffffaf0071d0 (LWP 5667) "ZMQbg/IO/0" 0x0000ffffaf7ec294 in epoll_pwait () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 4 Thread 0xffffa641b1d0 (LWP 5674) "yHg3r3fS" 0x0000ffffaf7b9d04 in clock_nanosleep@@GLIBC_2.17 () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 (gdb) bt #0 0x0000ffffafb3fa80 in do_futex_wait.constprop () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libpthread.so.0 #1 0x0000ffffafb3fb78 in __new_sem_wait_slow.constprop.0 () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libpthread.so.0 #2 0x0000ffffafb80318 in GC_stop_world () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #3 0x0000ffffafb6c020 in GC_stopped_mark () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #4 0x0000ffffafb6c8dc in GC_try_to_collect_inner () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #5 0x0000ffffafb6d598 in GC_collect_or_expand () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #6 0x0000ffffafb73b4c in GC_alloc_large () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #7 0x0000ffffafb74038 in GC_generic_malloc () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #8 0x0000ffffafb74298 in GC_malloc_kind_global () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #9 0x0000ffffafc11fa8 in scm_make_bytevector () from /gnu/store/7g3nbnf2kf31jk696k0nyz9ck55b11a0-guile-3.0.7/lib/libguile-3.0.so.1 #10 0x0000ffffacacc418 in ?? () #11 0x0000ffffacc2ef2c in ?? () (gdb) thr 4 [Switching to thread 4 (Thread 0xffffa641b1d0 (LWP 5674))] #0 0x0000ffffaf7b9d04 in clock_nanosleep@@GLIBC_2.17 () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 (gdb) bt #0 0x0000ffffaf7b9d04 in clock_nanosleep@@GLIBC_2.17 () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 #1 0x0000ffffaf7bf55c in nanosleep () from /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/libc.so.6 #2 0x0000ffffafb7e844 in GC_lock () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #3 0x0000ffffafb7ecdc in GC_do_blocking_inner () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #4 0x0000ffffafb73998 in GC_with_callee_saves_pushed () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #5 0x0000ffffafb79654 in GC_do_blocking () from /gnu/store/jsda4njqwjp4kb60fwa7n4mlfi1aanpq-libgc-7.6.12/lib/libgc.so.1 #6 0x0000ffffafc96d94 in scm_without_guile () from /gnu/store/7g3nbnf2kf31jk696k0nyz9ck55b11a0-guile-3.0.7/lib/libguile-3.0.so.1 #7 0x0000ffffafc97050 in scm_std_select () from /gnu/store/7g3nbnf2kf31jk696k0nyz9ck55b11a0-guile-3.0.7/lib/libguile-3.0.so.1 #8 0x0000ffffafc97b5c in scm_std_sleep () from /gnu/store/7g3nbnf2kf31jk696k0nyz9ck55b11a0-guile-3.0.7/lib/libguile-3.0.so.1 #9 0x0000ffffafc75918 in scm_sleep () from /gnu/store/7g3nbnf2kf31jk696k0nyz9ck55b11a0-guile-3.0.7/lib/libguile-3.0.so.1 #10 0x0000ffffa6c50d94 in ?? () #11 0x0000ffffacc2ee0c in ?? () --8<---------------cut here---------------end--------------->8--- The threads 1 and 4 do no respond anymore and are stuck, thread 1 on a futex wait and thread 4 on a sleep, both in the GC library. For what it's worth, I do not experiment this behaviour on x86 machines. I tried to come up with a smaller reproducer without success, but I'll keep trying. Thanks, Mathieu