Installation - apt-get update: Hash Sum mismatch

arwa - 12.03.2011, 12:58
Post subject: apt-get update: Hash Sum mismatch

since some weeks I get the following error on "apt-get update" very frequently:

W: Failed to fetch bzip2:/var/lib/apt/lists/partial/ftp.de.debian.org_debian_dists_unstable_main_binary-i386_Packages Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

Usually I fix this by switching between the two mirrors:

But the next day the activated mirror brings the same error, so I switch back to the other one again that will normally works again.

Currently both mirrors have this error. What might be the problem? Are the mirrors out of sync somehow? Is this a problem of the apt client? Is there anything that I could do to fix this?

nh2 - 12.03.2011, 13:30
Post subject: RE: apt-get update: Hash Sum mismatch
The same problem is annoying me since this morning and I can't manage to solve it like I used to do (by switching repos)...

The issue has been discussed here: http://aptosid.com/index.php?name=PNphp ... ight=bzip2
DonKult - 12.03.2011, 15:32
Post subject: RE: apt-get update: Hash Sum mismatch
As said: Ignore it. You can't do anything against it beside trying later. Its a temporary problem on the mirrors and if you try it at the right time you will experience it on every mirror.

Could it be that you try to upgrade always at the same time? The window is relatively small, but given that the mirrors are updated 4 times a day…

It is currently more likely to hit it "thanks" to mirrors not using the latest version of the mirror-update script, but even if that is fixed you will see it once in a while (I haven't seen it at all in the wild so far btw).

I have a small idea to catch the problem a bit earlier (= if-unmodified-since request header) - so that you get a different error message - but that requires quiet a bit of code and time and especially the later is currently limited for me thanks to exams i have to prepare… and as said. It doesn't fix the "problem" as such but more or less just adds another error message Wink
arwa - 12.03.2011, 16:45
Post subject: RE: apt-get update: Hash Sum mismatch
How long does a mirror sync need to complete? Sometimes the error lasts for some hours. But indeed, now it does work again. I just wondered that the error occurs much more often in the last weeks than the years before.

Shouldn't be a mirror sync more atomic? I do not know how it works, but I thought that the new package versions were synced to the mirrors first by always keeping the last version of the packages intact. The last operation then was to sync the package list and its checksum. This way the old package list still works, so upgrading with the old apt-get-updated package list would still work, and the new packages get active in one step with the new package list.

But maybe it is really just a problem of an old version of the "mirror-update script". Is there a way to find out, which one is used?

Another thing: When the error occurs, apt says "E: Some index files failed to download. They have been ignored, or old ones used instead." but when doing an "apt-get autoclean" after this did sweep away all packages. As I understand this should not happen, shouldn't it?

DonKult - 12.03.2011, 23:06
Post subject: RE: apt-get update: Hash Sum mismatch
Infrastructure is changed after the release, too, so sometimes even the core parts are failing - like dinstall (= the program responsible to build the archive) runs which seemed to happened today. So today the error message really did something useful. Wink

Mirror updates are best done in two steps. First all the new *.deb *.tar.gz and stuff files in the pool which can be easily multiple GB of data. Second all indexes like the Packages, Sources and Releasefiles which are all together maybe ~100 MB. The problem is that APT started recently to use the InRelease instead of Release files which has a few advantages, but many mirrors update this file already in the first step and not in the second step, so the window is open for the time needed to push maybe multiple GBs through the internet. Thats a bit misfortune and i am playing with the idea to disable that for now, but this a) removes a bit of pressure from the mirrors to update making it a 'maybe next year'-wishlist item and b) enables others to say: "Yeah, back then you did that for the mirrors, why not revert this for us now", which means whatever we try to do in the future it will be usable even slower… (InRelease files are on the mirrors for more than a year now).
arwa - 12.03.2011, 23:12
Post subject: RE: apt-get update: Hash Sum mismatch
If InRelease files make sense I would not revert them.

If you could desribe what I could ask my provider to update the mirror process I will ask him about it. Usually netcologne has a good support so I had the hope they will upgrade it.
DonKult - 13.03.2011, 00:07
Post subject: RE: apt-get update: Hash Sum mismatch
If they use the ftpsync from debian, just update to the latest version from here:

But if they don't but use handmangled rsync: At the place where they exclude Release* files, just exclude InRelease files, too with
… --exclude Release* --exclude InRelease --exclude ls-lR* …

While looking at it, it seems to be that the referred webpage wasn't updated to reflect that. Lets see if i will find tomorrow the right place to "complain" about that. Wink
All times are GMT - 12 Hours
Powered by PNphpBB2 © 2003-2010 The Zafenio Group