FS#23803 - Truncated database files and "Requested Range Not Satisfiable"
Attached to Project:
Pacman
Opened by Xyne (Xyne) - Sunday, 17 April 2011, 03:58 GMT
Last edited by Dave Reisner (falconindy) - Monday, 22 August 2011, 16:58 GMT
Opened by Xyne (Xyne) - Sunday, 17 April 2011, 03:58 GMT
Last edited by Dave Reisner (falconindy) - Monday, 22 August 2011, 16:58 GMT
|
Details
This appears to be a regression:
https://bugs.archlinux.org/task/15657
Updating the database fails with: error: core.db appears to be truncated: 38389/38390 bytes 0.0K 0.0K/s 00:00:00 error: failed retrieving file 'core.db' from example.com : Requested Range Not Satisfiable This first appeared tonight with mirrors.kernel.org as my main mirror. The second mirror does not matter. The only way to resolve the error is to remove the *.part files in the sync database, then change the main mirror. The resulting .part files were all the same size as the target database each time. Steps to reproduce: cd /var/lib/pacman/sync mv core.db core.db.part pacman -Sy |
This task depends upon
FS#20022. The only time we ever see issues like these is with people using mirrors.kernel.org. There have been quite a few similar reports with people and the community db using the kernel.org mirrors lately.This particular case seems to be caused by the last assumption. Pacman should detect range errors when possible and remove the .part file. If it cannot determine the status code (e.g. when using XferCommand) then it should simply remove the .part file if the download fails.
As for the first two assumptions, I think that in the absence of versioned databases, it should only try to continue a download from the same mirror, and only within a given interval (e.g. .part it not older than x minutes).