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 14:37:04 +0100 Message-ID: <87pnegrmyn.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="13177"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.3.6; emacs 26.3 To: 39610@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Feb 15 17:25:21 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 1j30Fr-0003LH-Rz for guile-bugs@m.gmane-mx.org; Sat, 15 Feb 2020 17:25:19 +0100 Original-Received: from localhost ([::1]:52554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j30Fq-0002fX-Uk for guile-bugs@m.gmane-mx.org; Sat, 15 Feb 2020 11:25:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48943) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j30Fc-0002P0-2H for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j30Fb-0005H8-1y for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j30Fa-0005Gy-Ui for bug-guile@gnu.org; Sat, 15 Feb 2020 11:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j30Fa-00055w-Rw 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 Original-Received: via spool by 39610-submit@debbugs.gnu.org id=B39610.158178389219556 (code B ref 39610); Sat, 15 Feb 2020 16:25:02 +0000 Original-Received: (at 39610) by debbugs.gnu.org; 15 Feb 2020 16:24:52 +0000 Original-Received: from localhost ([127.0.0.1]:36324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j30FP-00055E-NT for submit@debbugs.gnu.org; Sat, 15 Feb 2020 11:24:52 -0500 Original-Received: from ghost.xx.vu ([185.33.11.101]:4883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2xdC-0000us-0n for 39610@debbugs.gnu.org; Sat, 15 Feb 2020 08:37:14 -0500 Original-Received: from mail0.xx.vu (localhost [::1]) by ghost.xx.vu (OpenSMTPD) with ESMTP id 66b0c26e for <39610@debbugs.gnu.org>; Sat, 15 Feb 2020 13:37:05 +0000 (UTC) Original-Received: from londo ([213.162.73.60]) by mail0.xx.vu with ESMTPSA id 3ED0NQD0R15jgQEAg/rtjg (envelope-from ) for <39610@debbugs.gnu.org>; Sat, 15 Feb 2020 13:37:04 +0000 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:9578 Archived-At: [ re-send, used gmane to post a follow-up on the initial bug report, and realized that this likely cannot work. Apologies if I'm wrong and this ends up as a duplicate. ] 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