From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andreas Rottmann Newsgroups: gmane.lisp.guile.bugs Subject: bug#39610: R6RS `flush-output-port` not playing along with `transcoded-port` Date: Sat, 15 Feb 2020 11:27:06 +0100 Message-ID: <87wo8orvr9.fsf@londo.h.r0tty.org> References: <87d0agu2yd.fsf@londo.h.r0tty.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="12622"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: 39610@debbugs.gnu.org Cancel-Lock: sha1:FIHkptShXHpUXeYRyp6NBQqSql8= Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Feb 15 17:25:12 2020 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 1j30Fi-000395-DK for guile-bugs@m.gmane-mx.org; Sat, 15 Feb 2020 17:25:10 +0100 Original-Received: from localhost ([::1]:52548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j30Fh-0002Tr-D2 for guile-bugs@m.gmane-mx.org; Sat, 15 Feb 2020 11:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48941) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j30Fb-0002Om-QW for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j30Fa-0005Gk-LS for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j30Fa-0005Gg-Ia for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j30Fa-00055p-Fk for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87d0agu2yd.fsf@londo.h.r0tty.org> Resent-From: Andreas Rottmann Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 15 Feb 2020 16:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39610 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.158178389119547 (code B ref -1); Sat, 15 Feb 2020 16:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Feb 2020 16:24:51 +0000 Original-Received: from localhost ([127.0.0.1]:36322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j30FO-000559-MZ for submit@debbugs.gnu.org; Sat, 15 Feb 2020 11:24:51 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:36598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2ufM-0002nk-Oj for submit@debbugs.gnu.org; Sat, 15 Feb 2020 05:27:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43931) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2ufL-0001CG-Mg for bug-guile@gnu.org; Sat, 15 Feb 2020 05:27:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2ufK-0005hk-Lv for bug-guile@gnu.org; Sat, 15 Feb 2020 05:27:15 -0500 Original-Received: from ciao.gmane.io ([159.69.161.202]:54458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2ufK-0005hI-GR for bug-guile@gnu.org; Sat, 15 Feb 2020 05:27:14 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1j2ufI-000Kjo-Qo for bug-guile@gnu.org; Sat, 15 Feb 2020 11:27:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Mailman-Approved-At: Sat, 15 Feb 2020 11:24:50 -0500 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9577 Archived-At: Andreas Rottmann writes: > [...] I isolated the cause; the following snippet hangs on Guile 2.2 > and 3.0, while it worked as expected on 2.0: > > ;; ------------------ > (import (rnrs)) > > (let* ((p (pipe)) > (in (car p)) > (out (transcoded-port (cdr p) (make-transcoder (utf-8-codec))))) > (put-datum out "foo") > (flush-output-port out) > (display "Should have written to pipe by now, attempting reading a byte\n") > (display "Got") > (display (get-u8 in)) > (newline)) > ;; ------------------- > > It seems the underlying port is no longer flushed to the OS, so the > `get-u8` now hangs waiting for input, starting with Guile 2.2. > I'd like to add that this is indeed not passing data to the OS, as verified by strace. Also, I have now figured out the commit introducing the regression, namely 8399e7af5 ("Generic port facility provides buffering uniformly"); the commit before (e8eeeeb1d) still runs the above code to completion. I'd be somewhat motivated to try coming up with a fix, and turn the above snippet into a testcase, but I guess I could use some hinting in the right direction. Regards, Rotty