From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Linas Vepstas Newsgroups: gmane.lisp.guile.bugs Subject: bug#33641: guile-2.9.1 multi-threading crash Date: Wed, 5 Dec 2018 20:40:20 -0600 Message-ID: Reply-To: linasvepstas@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000048672d057c516c22" X-Trace: blaine.gmane.org 1544064004 13947 195.159.176.226 (6 Dec 2018 02:40:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2018 02:40:04 +0000 (UTC) To: 33641@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Dec 06 03:40:00 2018 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gUja3-0003SC-SO for guile-bugs@m.gmane.org; Thu, 06 Dec 2018 03:40:00 +0100 Original-Received: from localhost ([::1]:38570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUjc9-0006Ld-RB for guile-bugs@m.gmane.org; Wed, 05 Dec 2018 21:42:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUjc3-0006LX-So for bug-guile@gnu.org; Wed, 05 Dec 2018 21:42:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUjc2-0007SV-Dp for bug-guile@gnu.org; Wed, 05 Dec 2018 21:42:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58838) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUjc2-0007PZ-45 for bug-guile@gnu.org; Wed, 05 Dec 2018 21:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gUjc2-00076e-0j for bug-guile@gnu.org; Wed, 05 Dec 2018 21:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 06 Dec 2018 02:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33641 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154406406527245 (code B ref -1); Thu, 06 Dec 2018 02:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Dec 2018 02:41:05 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9279 Archived-At: --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--