From: Maxime Devos <maximedevos@telenet.be>
To: 48563@debbugs.gnu.org
Subject: bug#48563: move->fdes somewhat broken (EBADFD)
Date: Fri, 21 May 2021 14:45:05 +0200 [thread overview]
Message-ID: <8da248f8bc0801b965eec5d4bd636ccaacc91835.camel@telenet.be> (raw)
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
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 #<thunk 7f7774266d60>)
In ice-9/boot-9.scm:
718:2 6 (call-with-prompt ("prompt") #<procedure 7f7772d67e60 …> …)
In ice-9/eval.scm:
619:8 5 (_ #(#(#<directory (guile-user) 7f7774260c80>)))
In ice-9/boot-9.scm:
2806:4 4 (save-module-excursion #<procedure 7f7772d6a1e0 at ice-…>)
4351:12 3 (_)
In /home/sylviidae/a.scm:
4:6 2 (test #<input: #{read pipe}# 8>)
In ice-9/ports.scm:
302:9 1 (move->fdes #<input: #{read pipe}# 8> _)
In unknown file:
0 (primitive-move->fdes #<input: #{read pipe}# 8> 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 = 23855
(Shell): ls /proc/23855/fd/
(Shell output) 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
reply other threads:[~2021-05-21 12:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8da248f8bc0801b965eec5d4bd636ccaacc91835.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=48563@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).