From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#36350: [2.2.5] =?UTF-8?Q?=E2=80=98read-headers=E2=80=99?= blocks, thereby breaking web servers Date: Mon, 24 Jun 2019 12:32:18 +0200 Message-ID: <87pnn3b7f1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="130252"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) To: 36350@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jun 24 12:33:31 2019 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfMHx-000Xfo-6j for guile-bugs@m.gmane.org; Mon, 24 Jun 2019 12:33:29 +0200 Original-Received: from localhost ([::1]:49616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfMHw-0001gK-1u for guile-bugs@m.gmane.org; Mon, 24 Jun 2019 06:33:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45601) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfMHb-0001Xz-Ke for bug-guile@gnu.org; Mon, 24 Jun 2019 06:33:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfMHZ-0002Lh-9s for bug-guile@gnu.org; Mon, 24 Jun 2019 06:33:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfMHW-0002IG-LP for bug-guile@gnu.org; Mon, 24 Jun 2019 06:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfMHW-0007JH-HF for bug-guile@gnu.org; Mon, 24 Jun 2019 06:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 24 Jun 2019 10:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36350 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156137235427587 (code B ref -1); Mon, 24 Jun 2019 10:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Jun 2019 10:32:34 +0000 Original-Received: from localhost ([127.0.0.1]:55624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfMH4-0007Ag-Gn for submit@debbugs.gnu.org; Mon, 24 Jun 2019 06:32:34 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfMH3-00079k-B8 for submit@debbugs.gnu.org; Mon, 24 Jun 2019 06:32:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45441) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfMH1-0001IU-Di for bug-guile@gnu.org; Mon, 24 Jun 2019 06:32:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hfMH1-0001hs-5h; Mon, 24 Jun 2019 06:32:31 -0400 Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43456 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hfMGq-0002yD-Al; Mon, 24 Jun 2019 06:32:25 -0400 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Messidor an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:9357 Archived-At: Hello, In Guile 2.2.5, if you run: ./meta/guile examples/web/hello.scm & wget -O - http://localhost:8080 You=E2=80=99ll notice that =E2=80=98wget=E2=80=99 hangs (never receives a r= esponse) because the server is actually stuck in a read(2) call that will never complete, in =E2=80=98read-headers=E2=80=99. Reverting 73cde5ed7218a090ecee888870908af5445796f0 solves the problem. AIUI, before that commit, =E2=80=98read-header-line=E2=80=99 would read exa= ctly one line. After this change, it calls =E2=80=98lookahead-char=E2=80=99, which = can block, and that=E2=80=99s exactly what=E2=80=99s happening here. I don=E2=80=99t know how HTTP continuation lines work, so I=E2=80=99m not s= ure what a correct fix would look like. Mark, WDYT? I also noticed that there are no unit tests for (web server), which we should probably address while we=E2=80=99re at it. :-) Thanks, Ludo=E2=80=99.