GNU bug report logs - #36350
[2.2.5] ‘read-headers’ blocks, thereby breaking web servers

Previous Next

Package: guile;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 24 Jun 2019 10:33:02 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#36350: closed (Re: bug#36350: [2.2.5] ‘read-headers’
 blocks, thereby breaking web servers)
Date: Sun, 30 Jun 2019 19:51:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#36350: [2.2.5] ‘read-headers’ blocks, thereby breaking web servers

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 36350 <at> debbugs.gnu.org.

-- 
36350: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36350
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 36350-done <at> debbugs.gnu.org
Subject: Re: bug#36350: [2.2.5] ‘read-headers’
 blocks, thereby breaking web servers
Date: Sun, 30 Jun 2019 21:50:17 +0200
Hi,

Mark H Weaver <mhw <at> netris.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> writes:
>> Perhaps we should consider releasing 2.0.6 soon and use that in Guix
>> on ‘core-updates’.
>
> Sure, sounds like a good idea.

Done in a152a67d3865cc6e7f9d7abd8f17a6e905b8e841.  The test is simple
but would catch regressions like this one.

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guile <at> gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>
Subject: [2.2.5] ‘read-headers’ blocks, thereby
 breaking web servers
Date: Mon, 24 Jun 2019 12:32:18 +0200
Hello,

In Guile 2.2.5, if you run:

  ./meta/guile examples/web/hello.scm &
  wget -O - http://localhost:8080

You’ll notice that ‘wget’ hangs (never receives a response) because the
server is actually stuck in a read(2) call that will never complete, in
‘read-headers’.

Reverting 73cde5ed7218a090ecee888870908af5445796f0 solves the problem.

AIUI, before that commit, ‘read-header-line’ would read exactly one
line.  After this change, it calls ‘lookahead-char’, which can block,
and that’s exactly what’s happening here.

I don’t know how HTTP continuation lines work, so I’m not sure 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’re at it.  :-)

Thanks,
Ludo’.



This bug report was last modified 5 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.