From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#51264: Calling =?UTF-8?Q?=E2=80=98texi-fragment->stexi=E2=80=99?= in parallel leads to crashes Date: Mon, 18 Oct 2021 14:54:18 +0200 Message-ID: <87pms2a3yd.fsf@inria.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12959"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: 51264@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Oct 18 15:14:48 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 1mcSTX-0003ER-0S for guile-bugs@m.gmane-mx.org; Mon, 18 Oct 2021 15:14:47 +0200 Original-Received: from localhost ([::1]:35058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcSTV-0000WR-U0 for guile-bugs@m.gmane-mx.org; Mon, 18 Oct 2021 09:14:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcSAQ-00089q-GS for bug-guile@gnu.org; Mon, 18 Oct 2021 08:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcSAP-0007Q6-U0 for bug-guile@gnu.org; Mon, 18 Oct 2021 08:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcSAP-00063X-QY for bug-guile@gnu.org; Mon, 18 Oct 2021 08:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 18 Oct 2021 12:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51264 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163456167523237 (code B ref -1); Mon, 18 Oct 2021 12:55:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2021 12:54:35 +0000 Original-Received: from localhost ([127.0.0.1]:46223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcS9z-00062j-7y for submit@debbugs.gnu.org; Mon, 18 Oct 2021 08:54:35 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcS9n-00062S-VS for submit@debbugs.gnu.org; Mon, 18 Oct 2021 08:54:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcS9n-0007CW-6s for bug-guile@gnu.org; Mon, 18 Oct 2021 08:54:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38134) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcS9l-00077Y-Cd for bug-guile@gnu.org; Mon, 18 Oct 2021 08:54:22 -0400 Original-Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53964 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcS9l-0002qY-3V for bug-guile@gnu.org; Mon, 18 Oct 2021 08:54:21 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 =?UTF-8?Q?Vend=C3=A9miaire?= an 230 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-pc-linux-gnu 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:10193 Archived-At: --=-=-= Content-Type: text/plain Hello! I just stumbled upon this bug (here I use Guix to feed Texinfo strings but I suppose we could reduce the test case to be Guix-less.) Test case: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=bug-texi-parser-parallel.scm Content-Description: the test case (use-modules (guix) (gnu) (texinfo) (ice-9 threads)) (define sequential? (getenv "SEQUENTIAL")) (define (for-each/maybe-parallel proc lst) (if (pk 'sequential? sequential?) (for-each proc lst) (n-par-for-each 10 proc lst))) (for-each/maybe-parallel (lambda (package) (and=> (package-description package) (lambda (str) (catch 'parser-error (lambda () (texi-fragment->stexi str)) (lambda args (pk 'bah! args) (error "failed")))))) (fold-packages cons '())) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This code crashes when using =E2=80=98n-par-for-each=E2=80=99 but passes wh= en run sequentially: --8<---------------cut here---------------start------------->8--- $ guix time-machine --commit=3D9cda21cf20a5c9bdf97e3a6d6c8f901fc3e4307d -- = repl -- bug-texi-parser-parallel.scm ;;; (sequential? #f) ;;; (bah! (parser-error #f "Unknown command" codeand)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" endm)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" cod)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" comm)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" enum)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" cod)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" enem)) In thread: failed ;;; (bah! (parser-error #f "Unknown command" endmand)) In thread: failed ;;;;; (bah! (parser-error #f "Unknown command" eomm)) In thread: failed $ SEQUENTIAL=3Dy guix time-machine --commit=3D9cda21cf20a5c9bdf97e3a6d6c8f9= 01fc3e4307d -- repl -- bug-texi-parser-parallel.scm ;;; (sequential? "y") $ guix repl -- <(echo '(pk (version))') ;;; ("3.0.7") --8<---------------cut here---------------end--------------->8--- The bits shown in the =E2=80=98parser-error=E2=80=99 arguments suggests mem= ory corruption. Ludo=E2=80=99. --=-=-=--