[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#795284: marked as done (troubles with range requests)



Your message dated Sat, 9 Oct 2021 00:22:06 +0200
with message-id <20211008222206.clzbyyigziq3u7im@crossbow>
and subject line Re: Bug#795284: troubles with range requests
has caused the Debian Bug report #795284,
regarding troubles with range requests
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
795284: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795284
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: apt-cacher
Version: 1.7.11
Severity: normal

Client: jessie, just installed.

I *randomly* (i.e. from 2 to 5 files at every apt-get update run) get 
errors caused by apt issuing a range request for a file that it has 
already received fully.
I am not sure about who is at fault between apt and apt-cacher: if 
I issue the same range request to a normal mirror running Apache I get 
back the same error.

My workaround: I disabled support for range requests in apt-cacher.

What is ok the disk:

-rw-r--r-- 1 www-data www-data 3673 Aug 12 16:43 packages/debian_dists_jessie-updates_main_binary-amd64_Packages.bz2


How apt-cacher answers a normal HEAD request:

Date: Wed, 12 Aug 2015 15:49:13 GMT
Via: 1.1 pxe.mil.seeweb.it:80 (apt-cacher/1.7.11)
Accept-Ranges: bytes
Age: 360
ETag: "11a597-e59-51d18daedee40"
Server: Apache
Content-Length: 3673
Content-Type: application/x-bzip2
Last-Modified: Wed, 12 Aug 2015 08:17:53 GMT



Debug output:

GET /debian/dists/jessie-updates/main/binary-amd64/Packages.bz2 HTTP/1.1
Host: debian.seeweb.it
Cache-Control: max-age=0
Range: bytes=3673-
If-Range: Wed, 12 Aug 2015 08:17:53 GMT
User-Agent: Debian APT-HTTP/1.3 (1.0.9.8)


Answer for: http://debian.seeweb.it/debian/dists/jessie-updates/main/binary-amd64/Packages.bz2
HTTP/1.1 416 Invalid range: 3673-
Connection: Keep-Alive
Date: Wed, 12 Aug 2015 15:23:01 GMT
Accept-Ranges: bytes
Server: apt-cacher/1.7.11
Content-Length: 0
Content-Range: bytes */3673

-- 
ciao,
Marco

Attachment: pgpJ9r33UHWrc.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 1.1~exp9

The initial reported bug is impossible to reproduce since 1.1 (at the
latest) as among other things it includes "detect 416 complete file in
partial by expected hash". While there are at times trouble with ranges
(e.g. apt!188 on salsa) nothing of that sort has a recent report and the
code not only changed in 2015 while this was reported but also in the
following 6 years. Closing as "likely fixed, but never closed so far".


On to the 'hijack' from yesterday:

On Fri, Oct 08, 2021 at 09:19:53PM +0200, Eduard Bloch wrote:
> Please restore the original algorithm, which refetched the last byte.

I removed the -1 hack in 2013 (78c72d0ce22e00b194251445aae306df357d5c1a)
which had his own set of problems too boring to get into. Either way, as
a http client it would be cool if we handled 416 correctly, so assuming
we had an edge case (of an edge case) in which apt is buggy, it would be
silly to restore the -1 hack for this while we leave the problem itself
unfixed for the remaining edge cases…


> HTTP/1.1 416 Requested Range Not Satisfiable
> Content-Length: 512
> Content-Type: text/html
> Date: Fri, 08 Oct 2021 18:26:45 GMT
> Server: Debian Apt-Cacher NG/3.7.3

If you look more closely at the bug report you will notice that there is
a key difference between the apt-cacher and the apt-cacher-ng reply:
The later has no Content-Range header, a http spec should.

If it had apt would happily notice that it has the full file and not
make another get request, but the 416 alone is inconclusive.


> If-Modified-Since: Thu, 07 Oct 2021 14:15:24 GMT

This btw is the last modification of the (previous) Release file it has
stored in lists/ as the partial file got deleted in the 416 handling.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply to: