Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".
* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
FS#15657 - presence of new db version is not checked when <dbfile>.part exists
Attached to Project:
Pacman
Opened by Roman Kyrylych (Romashka) - Thursday, 23 July 2009, 15:49 GMT-4
Last edited by Dan McGee (toofishes) - Thursday, 12 November 2009, 03:07 GMT-4
Opened by Roman Kyrylych (Romashka) - Thursday, 23 July 2009, 15:49 GMT-4
Last edited by Dan McGee (toofishes) - Thursday, 12 November 2009, 03:07 GMT-4
|
DetailsSummary and Info:
When doing -Syy some time after previous download was interrupted: :: Synchronizing package databases... debug: using 'testing.db.tar.gz' for download progress debug: existing file found, using it debug: HTTP_PROXY: (null) debug: http_proxy: (null) debug: FTP_PROXY: (null) debug: ftp_proxy: (null) error: failed retrieving file 'testing.db.tar.gz' from dev.archlinux.org : Requested Range Not Satisfiable debug: failed to sync db: Requested Range Not Satisfiable error: failed to update testing (Requested Range Not Satisfiable) Between download was interrupted and new download started the db file was updated and became smaller so that range does not exist anymore. Not sure what would happen if range was satisfiable, theoretically it should result in a broken db file. The bug here is that pacman does not seem to even check if the file was changed and goes straight to continuing the download of <dbname>.part Steps to Reproduce: you may want to try the attached file, just put it in /var/lib/pacman and run -Syy |
This task depends upon
testing.db.tar.gz.part
When starting new download check if dbfile last update time as specified by server is newer than that of local file or .part file.
It's easier to just go with Dan's idea though.
Then such check won't be needed (even for packages, I cannot imagine a situation when package file gets updated without changing its name).
- int _alpm_download_single_file(const char *filename,
alpm_list_t *servers, const char *localpath,
time_t mtimeold, time_t *mtimenew)
- handle->fetchcb(url, localpath, mtimeold, mtimenew) (+ the callback itself)
- int _alpm_download_files(alpm_list_t *files,
alpm_list_t *servers, const char *localpath)
- static int download(const char *url, const char *localpath,
time_t mtimeold, time_t *mtimenew) {
- download_internal(url, localpath, mtimeold, mtimenew)
?
The funny thing with the mtime stuff right now is we only use it for databases. If we didn't, our logic would be completely broken as passing an identical mtime in aborts the download early without any regard for whether the download is finished.
I would have tried to address this before 3.3 if it was an easy problem, but it might have to wait until 3.3.1 or even 3.4 as it will probably require an API change.
I will wait for your initial work :)
Workaround there is to remove the cached (partial) download, and restart. If that does not work, wget && pacman -U =p
However, the database changes all the time while keeping the same name. This is what gives us some troubles.
a) package downloads should never error out like:
error: failed retrieving file 'foobar-1.0-1-i686.pkg.tar.gz' from
foo.bar.org : Requested Range Not Satisfiable
-OR-
b) package downloads can error out like that (if an update is interrupted and then resumed with an -Syyu for instance) but it's because the database changes all the time
-OR-
c) I should not stop cursing my ISP
- this should never happen for package download (unless you are hit by some very weird and more serious bug like
FS#16359)- this might happen for database download, because of a limitation of pacman (not a bug), which is what this whole report is about
So if your situation is not the same as
FS#16359, please open a new bug report, with as much details as possible.[schiv@v3000 ~]$ sudo pacman -S go-openoffice
resolving dependencies...
looking for inter-conflicts...
Targets (1): go-openoffice-3.1.1.2-1
Total Download Size: 166.99 MB
Total Installed Size: 361.03 MB
Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
^Co-openoffice-3.1.1... 1392.5K 82.6K/s 00:34:12 [---------] 0%
Interrupt signal received
[schiv@v3000 ~]$ sudo pacman -S go-openoffice
resolving dependencies...
looking for inter-conflicts...
Targets (1): go-openoffice-3.1.1.2-1
Total Download Size: 166.99 MB
Total Installed Size: 361.03 MB
Proceed with installation? [Y/n] y
:: Retrieving packages from extra...
error: failed retrieving file 'go-openoffice-3.1.1.2-1-i686.pkg.tar.gz' from mirror.internode.on.net : Requested Range Not Satisfiable
^C
Interrupt signal received
I believe it's related, which then as a by-product is leading to
FS#16359. So, in the words of this task's summary:"The bug here is that pacman does not seem to even check if the file was changed and goes straight to continuing the download of <pkg>.part"
But alas, I wouldn't be able to attach the .part file even if I interrupted it at 10K, because it'd be over 1G by the time I do a ^C! (moving on to
FS#16359)Another thing I don't get : in the first download, how did you simulate network disconnection ? And when you did that simulation, the download did not stop ?
And you had to to ctrl+C after the simulated interruption ?
As for the simulation, simply networkmanager gui > disconnect, or killall $dialer where in my case is pppd. One could simply reproduce this by pulling out the network cable as well, or bringing down the interface, or any other brutal method (hint: please try).
Correct - the download did not stop. It just paused with no visual feedback, but in the background the file gets filled with crap at the speed of sound.