Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
arwaOffline
Post subject: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 12:58



Joined: 2010-09-11
Posts: 183

Status: Offline
Hello,

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:
http://debian.netcologne.de/debian/
http://ftp.de.debian.org/debian/

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?

Thanks,
arwa
 
 View user's profile Send private message  
Reply with quote Back to top
nh2Offline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 13:30



Joined: 2011-01-28
Posts: 25
Location: Tlemcen, Algeria
Status: Offline
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
DonKultOffline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 15:32
Team Member


Joined: 2010-09-02
Posts: 482

Status: Offline
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

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
arwaOffline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 16:45



Joined: 2010-09-11
Posts: 183

Status: Offline
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?

Thanks,
arwa
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 23:06
Team Member


Joined: 2010-09-02
Posts: 482

Status: Offline
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).

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
arwaOffline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 12.03.2011, 23:12



Joined: 2010-09-11
Posts: 183

Status: Offline
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.
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: apt-get update: Hash Sum mismatch  PostPosted: 13.03.2011, 00:07
Team Member


Joined: 2010-09-02
Posts: 482

Status: Offline
If they use the ftpsync from debian, just update to the latest version from here:
http://www.debian.org/mirror/ftpmirror.en.html

But if they don't but use handmangled rsync: At the place where they exclude Release* files, just exclude InRelease files, too with
      Code:
… --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

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio