From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#14756: threads - par-map - multicore issue Date: Tue, 21 Jun 2016 10:33:47 +0200 Message-ID: <87vb13c55g.fsf@gnu.org> References: <20130630150054.07f19f35@capac> <87lh1z592a.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466498127 6169 80.91.229.3 (21 Jun 2016 08:35:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 08:35:27 +0000 (UTC) Cc: 14756@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jun 21 10:35:16 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFH9Q-0006mE-6u for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 10:35:16 +0200 Original-Received: from localhost ([::1]:49826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFH9P-00072l-55 for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 04:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFH9G-0006xP-VB for bug-guile@gnu.org; Tue, 21 Jun 2016 04:35:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFH9C-0006fX-Mq for bug-guile@gnu.org; Tue, 21 Jun 2016 04:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFH9C-0006fT-Jr for bug-guile@gnu.org; Tue, 21 Jun 2016 04:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bFH9C-0002nQ-FL for bug-guile@gnu.org; Tue, 21 Jun 2016 04:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Tue, 21 Jun 2016 08:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14756 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14756-submit@debbugs.gnu.org id=B14756.146649807110701 (code B ref 14756); Tue, 21 Jun 2016 08:35:02 +0000 Original-Received: (at 14756) by debbugs.gnu.org; 21 Jun 2016 08:34:31 +0000 Original-Received: from localhost ([127.0.0.1]:48531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFH8h-0002mX-9s for submit@debbugs.gnu.org; Tue, 21 Jun 2016 04:34:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFH8f-0002mI-UL for 14756@debbugs.gnu.org; Tue, 21 Jun 2016 04:34:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFH8X-0006VV-Nm for 14756@debbugs.gnu.org; Tue, 21 Jun 2016 04:34:24 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFH83-0006SU-W4; Tue, 21 Jun 2016 04:33:52 -0400 Original-Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:41252 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bFH82-0005kx-8l; Tue, 21 Jun 2016 04:33:50 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Messidor an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87lh1z592a.fsf@pobox.com> (Andy Wingo's message of "Tue, 21 Jun 2016 08:51:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:8065 Archived-At: Andy Wingo skribis: > I see this, but I'm not quite sure what's going on. What I do see is > that par-map of 1+ on a list is horribly slow, both on 2.0 and master. > Ludovic do you know what's going on here? As David put it, only one core is being used, which is clearly a bug. I believe the bug was introduced by 8a177d316c0062afe74f9a761ef460e297435e59 (however, before that commit, you would hit a stack overflow when doing =E2=80=98par-map=E2=80=99 on a la= rge-enough list.) What happens is that =E2=80=98par-mapper=E2=80=99 creates nested futures wh= ose dependency graph forms a comb-shaped tree; thus we quickly hit %MAX-NESTING-LEVEL. This is fine in itself, but for some reason, it ends up evaluating most of those futures in one thread while the other threads apparently remain stuck in =E2=80=98wait-condition-variable=E2=80=99 in =E2=80=98process-futu= res=E2=80=99. I=E2=80=99ve looked into it a bit but that needs more time=E2=80=A6 Ludo=E2=80=99.