From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.bugs Subject: bug#48563: move->fdes somewhat broken (EBADFD) Date: Fri, 21 May 2021 14:45:05 +0200 Message-ID: <8da248f8bc0801b965eec5d4bd636ccaacc91835.camel@telenet.be> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Ak2DJpmdGznix/xEd52g" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19930"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 To: 48563@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Fri May 21 14:46:24 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 1lk4Xm-0004o0-5l for guile-bugs@m.gmane-mx.org; Fri, 21 May 2021 14:46:22 +0200 Original-Received: from localhost ([::1]:48842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk4Xl-0002Xm-2v for guile-bugs@m.gmane-mx.org; Fri, 21 May 2021 08:46:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk4XU-0002Uv-ML for bug-guile@gnu.org; Fri, 21 May 2021 08:46:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk4XS-0005ZO-Kf for bug-guile@gnu.org; Fri, 21 May 2021 08:46:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lk4XS-0000do-H1 for bug-guile@gnu.org; Fri, 21 May 2021 08:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 21 May 2021 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48563 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16216011252417 (code B ref -1); Fri, 21 May 2021 12:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 May 2021 12:45:25 +0000 Original-Received: from localhost ([127.0.0.1]:36013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk4Wr-0000cv-CG for submit@debbugs.gnu.org; Fri, 21 May 2021 08:45:25 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:35440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk4Wn-0000cl-UR for submit@debbugs.gnu.org; Fri, 21 May 2021 08:45:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk4Wl-0001p6-PV for bug-guile@gnu.org; Fri, 21 May 2021 08:45:20 -0400 Original-Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:53056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk4Wh-0004wb-6d for bug-guile@gnu.org; Fri, 21 May 2021 08:45:19 -0400 Original-Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id 7QlA2500U0mfAB406QlBLS; Fri, 21 May 2021 14:45:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1621601111; bh=d9RghioTHaue0dv8J8pclBX5bHHWDskGtEAK5x7c0f4=; h=Subject:From:To:Date; b=XtlDolCEkmDfFy7qDi1BNfc//2yTwfmMZhAAgJ8AXZnF1ncjTOVyKaJUyrT9exgZ0 l7FF6H2fNeb8UIAx6hIxtYbN5PzYNe0oj8XuMvX9tiP9N59Q7fyvyxVUC251l0jwwi iSb+cdzGMev98dQVB1vp15kFI+OYTxB2/mjczHDNrdrhbqoUF+9v0I+1+aazS/9Riw E04aSAgN1yYzYtFzO8rbrnw4ecIg0yZygF0E/Xc3gwN6FSgZOeWVLr4YYg29MlPs1x Mw+WeQH+kBskBgRPnQ1pSF2jQkDp6nCZZoil0tZ57c4qLsoZBH057VZmYZ5VMj97/X Bl2mvgQV0YV4w== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:10100 Archived-At: --=-Ak2DJpmdGznix/xEd52g Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable version: 3.0.5 Reproducer: a.scm: (define (test p) (let loop ((i 0)) (when (< (pk 'i i) 40) (move->fdes p i) (loop (+ 1 i))))) (test (car (pipe)) Run guile -l a.scm. The result is non-deterministic. Output (try #1--#2): ;;; (i 0) [...] ;;; (i 9) Backtrace: In ice-9/boot-9.scm: 1736:10 8 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 7 (apply-smob/0 #) In ice-9/boot-9.scm: 718:2 6 (call-with-prompt ("prompt") # =E2=80=A6) In ice-9/eval.scm: 619:8 5 (_ #(#(#))) In ice-9/boot-9.scm: 2806:4 4 (save-module-excursion #) 4351:12 3 (_) In /home/sylviidae/a.scm: 4:6 2 (test #) In ice-9/ports.scm: 302:9 1 (move->fdes # _) In unknown file: 0 (primitive-move->fdes # 9) ERROR: In procedure primitive-move->fdes: In procedure primitive-move->fdes: Ongeldige bestandsdescriptor Output (try #3): (this time no error) ;;; (i 0) [...] ;;; (i 40) GNU Guile 3.0.5 Copyright (C) 1995-2021 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. Some more debugging. scheme@(guile-user)> (getpid) $1 =3D 23855 (Shell): ls /proc/23855/fd/ (Shell output) 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9 --=-Ak2DJpmdGznix/xEd52g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYKerURccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uImAP4pZe5fMf5Tcx8GsyHDPDcxCRUI egYsyLYRM/cZe9cvegEAkBKZPpCByph9iLSvlz2ZqV+f9RiROH9jnb/2xwbA4AQ= =S6J8 -----END PGP SIGNATURE----- --=-Ak2DJpmdGznix/xEd52g--