From debbugs-submit-bounces@debbugs.gnu.org Fri May 21 08:45:25 2021 Received: (at submit) by debbugs.gnu.org; 21 May 2021 12:45:25 +0000 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 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 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 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 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 Message-ID: <8da248f8bc0801b965eec5d4bd636ccaacc91835.camel@telenet.be> Subject: move->fdes somewhat broken (EBADFD) From: Maxime Devos To: bug-guile@gnu.org Date: Fri, 21 May 2021 14:45:05 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Ak2DJpmdGznix/xEd52g" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 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-Spam-Score: 0.2 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-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--