Bug#603463: apache2-mpm-worker: Seems to send incorrect multi-page reply
reassign 603463 apt-cacher-ng
thanks
On Wednesday 17 November 2010, Bas Wijnen wrote:
> Op 16-11-10 23:50, Stefan Fritsch schreef:
> >> The problem seems to be in packet 19. It contains 3 HTTP parts,
> >> the second of which does not seem to have data in it (according
> >> the wireshark's parser). However, when looking at that part, it
> >> not only contains data: it also contains the next HTTP header.
> >
> > The problem is that there is a 304 response which should not
> > happen for an unconditional request. But the 304 response not
> > having any body is OK (it doesn't have a content-length header
> > either).
Sorry, I overlooked something here. The 4th request on that connection
is a conditional request (it has a If-Modified-Since header).
Therefore the "304" response without any request body is OK.
It turns out the problem is not in packet 19, which is well after the
90 second delay, but in packet 6, which is the last data received
before the delay, and the last data on that connection. The
connection contains 8 requests:
GET /ftp.nl.debian.org/debian/dists/unstable/Release.gpg HTTP/1.1
Host: localhost:3142
Connection: keep-alive
Cache-Control: max-age=0
If-Modified-Since: Sun, 14 Nov 2010 02:16:14 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /ftp.nl.debian.org/debian/dists/unstable/main/i18n/Translation-
en.bz2 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /ftp.nl.debian.org/debian/dists/unstable/main/i18n/Translation-
en_GB.bz2 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /ftp.nl.debian.org/debian/dists/unstable/main/i18n/Translation-
nl.bz2 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
If-Modified-Since: Sat, 13 Nov 2010 13:27:02 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /multimedia/dists/unstable/Release.gpg HTTP/1.1
Host: localhost:3142
Connection: keep-alive
Cache-Control: max-age=0
If-Modified-Since: Sat, 13 Nov 2010 23:23:04 GMT
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /multimedia/dists/unstable/main/i18n/Translation-en.bz2 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /multimedia/dists/unstable/main/i18n/Translation-en_GB.bz2
HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
GET /multimedia/dists/unstable/main/i18n/Translation-nl.bz2 HTTP/1.1
Host: localhost:3142
Connection: keep-alive
User-Agent: Debian APT-HTTP/1.3 (0.8.8)
The first response is ok. A 304 response is not supposed to have a
body ("data" as you call it):
HTTP/1.1 304 Not Modified
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source:
http://ftp.debian.org/debian/dists/unstable/Release.gpg
Connection: Keep-Alive
The second response is a 404 which should have a body. But apt-cacher-
ng does not include a body, therefore it must send a "Content-Length:
0" header. Or, seen the other way round, since this response does not
include a Content-Length header, aptitude must treat all data to the
end of the connection as body for this responce, per RFC 2616 4.4.
Therefore aptitude has to wait until apt-cacher-ng closes the
connection, which apt-cacher-ng does after 90 seconds. This is what
makes aptitude seem to hang.
HTTP/1.1 404 Not Found
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source:
http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-
en.bz2
Connection: Keep-Alive
The same for the 3rd response:
HTTP/1.1 404 Not Found
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source:
http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-
en_GB.bz2
Connection: Keep-Alive
HTTP/1.1 304 Not Modified
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source:
http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-
nl.bz2
Connection: Keep-Alive
HTTP/1.1 304 Not Modified
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source: http://www.debian-
multimedia.org/dists/unstable/Release.gpg
Connection: Keep-Alive
The same for the 6th response:
HTTP/1.1 404 Not Found
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source: http://www.debian-
multimedia.org/dists/unstable/main/i18n/Translation-en.bz2
Connection: Keep-Alive
Even if those responses above would not be broken, the 7th response is
broen in a different way. It says "Content-Length: 14", but there is
no content following the headers. So the first 14 bytes of the 8th
response are treated as content of the 7th response, which would be
"HTTP/1.1 404 Not".
HTTP/1.1 404 Not Found
Content-Length: 14
Last-Modified: Thu, 10 Jun 2010 18:25:48 GMT
Content-Type: application/octet-stream
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source: http://www.debian-
multimedia.org/dists/unstable/main/i18n/Translation-en_GB.bz2
Connection: Keep-Alive
HTTP/1.1 404 Not Found
Content-Length: 14
Last-Modified: Thu, 10 Jun 2010 18:25:43 GMT
Content-Type: application/octet-stream
Date: Sun Nov 14 07:15:55 2010
Server: Debian Apt-Cacher NG/0.5.10
X-Original-Source: http://www.debian-
multimedia.org/dists/unstable/main/i18n/Translation-nl.bz2
Connection: Keep-Alive
So my initial analysis is incorrect and there is actually a bug in
apt-cacher-ng. Reassigning.
Reply to: