From unknown Sun Jun 15 10:54:40 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#33641 <33641@debbugs.gnu.org> To: bug#33641 <33641@debbugs.gnu.org> Subject: Status: guile-2.9.1 multi-threading crash Reply-To: bug#33641 <33641@debbugs.gnu.org> Date: Sun, 15 Jun 2025 17:54:40 +0000 retitle 33641 guile-2.9.1 multi-threading crash reassign 33641 guile submitter 33641 linasvepstas@gmail.com severity 33641 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 21:41:05 2018 Received: (at submit) by debbugs.gnu.org; 6 Dec 2018 02:41:05 +0000 Received: from localhost ([127.0.0.1]:34863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUjb7-00075M-6n for submit@debbugs.gnu.org; Wed, 05 Dec 2018 21:41:05 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUjb5-00074m-IZ for submit@debbugs.gnu.org; Wed, 05 Dec 2018 21:41:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUjay-00042N-Mq for submit@debbugs.gnu.org; Wed, 05 Dec 2018 21:40:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46565) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gUjaw-0003wl-Q7 for submit@debbugs.gnu.org; Wed, 05 Dec 2018 21:40:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUjau-0006I6-K5 for bug-guile@gnu.org; Wed, 05 Dec 2018 21:40:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUjap-0003mm-OH for bug-guile@gnu.org; Wed, 05 Dec 2018 21:40:52 -0500 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:39995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUjad-0003kK-Up for bug-guile@gnu.org; Wed, 05 Dec 2018 21:40:39 -0500 Received: by mail-io1-xd2b.google.com with SMTP id n9so18457570ioh.7 for ; Wed, 05 Dec 2018 18:40:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=zQQSP6ksOwEPwZYcf77bp0dnA7cet9wMp23TWNjk/0g=; b=dUoR9wlytGmaXsqiykUobyqVUnd8S2fDjXvPTwXygLoOtmefQEiKXcUoQKsErEXugW 9ACyOLHpmexYzdeaF2qT2o5WkGCKoJmI8sOFvs0nHnaDEFcg4uLJ9D3XQtROab2OaLsV VfZFKnrGQp1ktT9kJz/fXLQNDnQHfyN/k1iCnTrbz59UdRjHSPN6W4RsOG05dXMyijcx /WeK2xXgxycbSuTzE+hDSClFGdVkZTzv2YG7FCB19g247dXLQTwyTeCtQcKp7nGbNexN DPYO1FsHEGScrd0XEK9Yr9z9YId9ELKSauHk0dBBeUgSqsUS16OkJWLNpJDCpwv8eQJB nLug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=zQQSP6ksOwEPwZYcf77bp0dnA7cet9wMp23TWNjk/0g=; b=tCNwfwOPtbq5/k2HKemZna9KcN8zhlZQqeAsATmeRj6r9Ar4/iFyleLgQyUzsPwH8w vCPAronDEi1kMBWW1VY10qTObxWPSAIfgF8gO3+sgLuaCu9QJf7YZ9/QyW4zh7VMTsrE ybSlKePKH+9FISk4bm+p1zbsNPk4pz3NeXgKxRmt2gUwDozgY10w7HeyLCIsZN43H5KL dm12/LsL6xWX7luW1lhrIWCvoqgx5RgORiVsPwTKQMo6UKAASyZNwQWyG+XTR9Dg8C9q hvVSEscCZ6rPT233HDApX6UKcq48A1Able0+4PZsQ17pK29PW3a0gQRhQcfu+xpt6hGm MxQQ== X-Gm-Message-State: AA+aEWbJwqY/WZMagztZeuhdkJIEbxYiAIwsnpcuzE8AnsuEgDXf9At2 UH6/NfjZwSak/m0gCW3JTkwCM4MTMLL2+dfGuBZ1G9CS X-Google-Smtp-Source: AFSGD/UmCGDDo/5cbLaRwVet0OWxbxzL5E3ocGyi392bdqWD0HhbnkEfxkLi/lidBzlMZ9siDpT0H5NTSBKefFZ5ybs= X-Received: by 2002:a5e:8618:: with SMTP id z24mr14430699ioj.35.1544064034431; Wed, 05 Dec 2018 18:40:34 -0800 (PST) MIME-Version: 1.0 From: Linas Vepstas Date: Wed, 5 Dec 2018 20:40:20 -0600 Message-ID: Subject: guile-2.9.1 multi-threading crash To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary="00000000000048672d057c516c22" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: linasvepstas@gmail.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --00000000000048672d057c516c22 Content-Type: text/plain; charset="UTF-8" The following bug report is informal, without any simple test, right now. Very reproducible, though. I have a unit test (it passes with guile-2.2) that creates 120 threads and races them as fast as possible, each thread launched from C++, entering guile, and then from guile, calling some wrappered C++ code. With 2.9.1, the test crashes about half the time, always with the same stack trace ``` (gdb) info threads Id Target Id Frame 1 Thread 0x7ffff7fdcbc0 (LWP 24595) "MultiThreadUTes" 0x00007ffff7bc298d in pthread_join (threadid=140737247344384, thread_return=0x0) at pthread_join.c:90 ``` and most of the rest in `__lll_lock_wait` (that my c++ code asks for) or `pthread_cond_wait@@GLIBC_2.3.2` from GC_wait_marker. The stack trace itself is useless; the core issue is the `thread_return=0x0` above. ``` (gdb) bt #0 0x00007ffdb03c7040 in ?? () #1 0x0000000000000001 in ?? () #2 0x00007ffff40a553c in __GI___libc_free (mem=) at malloc.c:2968 #3 0x0000000000000000 in ?? () ``` Its hard to see what this has to do with guile, other than that this test has been run thousands of times on guile-2.2 without issues. (Reproducible by running the "MultiThreadUTest" of https://github.com/opencog/atomspace) -- Linas -- cassette tapes - analog TV - film cameras - you --00000000000048672d057c516c22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The following bug report is informal, without any simple test, righ= t now. Very reproducible, though.

I have a unit test (it passes wit= h guile-2.2) that creates 120 threads and races them as fast as possible, e= ach thread launched from C++, entering guile, and then from guile, calling = some wrappered C++ code. With 2.9.1, the test crashes about half the time, = always with the same stack trace
```
(gdb) info threads
=C2=A0 Id= =C2=A0=C2=A0 Target Id=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Fram= e
=C2=A0 1=C2=A0=C2=A0=C2=A0 Thread 0x7ffff7fdcbc0 (LWP 24595) "Mul= tiThreadUTes"
0x00007ffff7bc298d in pthread_join (threadid=3D140737= 247344384,
thread_return=3D0x0)
=C2=A0=C2=A0=C2=A0 at pthread_join.c:= 90
```
and most of the rest in `__lll_lock_wait` (that my c++ code as= ks for) or `pthread_cond_wait@@GLIBC_2.3.2` from GC_wait_marker. The stack = trace itself is useless; the core issue is the `thread_return=3D0x0` above.=
```
(gdb) bt
#0=C2=A0 0x00007ffdb03c7040 in ?? ()
#1=C2=A0 0x0= 000000000000001 in ?? ()
#2=C2=A0 0x00007ffff40a553c in __GI___libc_free= (mem=3D<optimized out>)
=C2=A0=C2=A0=C2=A0 at malloc.c:2968
#3= =C2=A0 0x0000000000000000 in ?? ()
```
Its hard to see what this has = to do with guile, other than that this test has been run thousands of times= on guile-2.2 without issues.

(Reproducible by running th= e "MultiThreadUTest" of https://github.com/opencog/atomspace)

-- Linas
--
cassette tapes - analog TV - film ca= meras - you
--00000000000048672d057c516c22--