Posts: 347
Silent Observer
Joined: 08 Aug 2013
#1
Recently (last week or so) I've gotten an error whenever I tried to use either apt-get update or update repos in Synaptic on my laptop. Most of the repos download their lists correctly, but the last three in order give this:

Code: Select all

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/main/binary-i386/PackagesIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/contrib/binary-i386/PackagesIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/contrib/i18n/Translation-enIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/main/i18n/Translation-enIndex  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
I'm only seeing this on my laptop, not on my Athlon XP system. Suggestion?
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#2
Wait until it fixes itself, or change the repos from us to somewhere else eg ca for Canada, de for Germany.
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#3
Okay, so it's probably a server downtime issue? In that case, I won't worry about it, but just try to remember to do the laptop updates immediately after I get a good update on my Athlon XP (which is much faster and has more than 3x the RAM).
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#4
Okay, I just tried to get the updates on the laptop again, while the Athlon XP system was successfully updating and got the same error as above, but for a slightly different list of servers. The"hash sum mismatch" seems like an uncorrected data transfer error -- and this is preventing my laptop from getting updates via dist-upgrade. Could this be due to a low quality wifi connection?
Posts: 667
jdmeaux1952
Joined: 01 Nov 2013
#5
Silent Observer wrote: Could this be due to a low quality wifi connection?
That is what it sounds like -- poor reception. You may want to try one of those USB wifi doogles to see if your wifi improves. Or use a cable to hardwire it temporarily into your router.
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#6
I'm currently connected with a wifi PCMCIA card, to a software access point that uses a wifi dongle on an extension cable on the Athlon XP system -- it's usually about -55 to -70 dB signal strength, (two interior walls and a closed interior door between, but only about 25 feet actual distance). The dongle is better at detecting the neighbors' networks (I think due to orientation), but the two systems never have any trouble seeing each other. Is there any way to force the wifi on either end to operate at higher power, or does it automatically cut itself back until it's just barely connected as I think I understand to be the case?
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#7
Okay, I moved the laptop to a location where I could connect on my wired network -- and I'm getting the exact same error trying to run apt-get update:

Code: Select all

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/main/binary-i386/PackagesIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/contrib/binary-i386/PackagesIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/non-free/binary-i386/PackagesIndex  Hash Sum mismatch

W: Failed to fetch http://ftp.us.debian.org/debian/dists/testing/main/i18n/Translation-enIndex  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
Apparently this isn't a wifi connection quality problem...

Edit: With the laptop back on wifi connection, I changed the failing repo from ftp.us.debian.org to ftp.ca.debian.org, and my update went right through (or I should say, is still in process; it takes a while for a 300 MHz processor to apply 180 or so upgrades). Now the question is why the laptop is having trouble getting package indices from the US mirror of debian.org, but gets them without problems from the Canadian outlet -- while my Athlon XP gets them from the US mirror without issue. They're running different kernel versions, and have a few different packages installed, but my router should make them look like the same IP address from outside my LAN...
Posts: 850
fatmac
Joined: 26 Jul 2012
#8
Only thought I can think of is maybe one is stable & the other is testing (?).
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#9
fatmac wrote:Only thought I can think of is maybe one is stable & the other is testing (?).
Nope, both are on testing repos. The only difference between the two systems that I can think might matter for repo connection or hash sums is that the Athlon XP system is able to use the 3.12.5 antiX kernel, while that version won't run on the laptop (presumably an inadvertent compile switch that blocks it from the Pentium II class processor) and I'm running 3.12.3 on that machine. Is the hash sum function used by apt built into the kernel? But if that's it, why do I get that only on the debian repos, not on daveserver or duinsoft? And why would switching to Canadian servers resolve the problem?

I think this has to be a hash sum calculation related bug, but one that resides on the ftp.us.debian.org servers (or an incompatibility between those servers and the i386 version of the hash sum calculator that goes with the 3.12.3 antiX kernel).
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#10
I don't think it has anything to do with the kernel, but is to do with when you tried to upgrade. For some reason, there was a mismatch probably due to changes made to the repo (not by you, but by a mainatainer adding a new deb at the same time as you were downloading it).

You may even be able to use the original repo. Do apt-get clean and/or apt-get autoclean. Then the usual apt-get update etc.

(Note apt-get clean will remove your stored debs so if you want to save them, copy them somewhere before doing apt-get clean)
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#11
Would that cause a failure while I was successfully updating my Athlon XP system from the same repos? Or would it cause a failure that would persist following the initial mismatch? I can see where, if a deb was changed while I was in process of downloading the difference index, it would cause a mismatch, but I had this error, give or take one different line, every time I tried to update the laptop over the course of several days; it's hard to believe I hit the repo server just as files were being changed half a dozen times in a row...
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#12
You only need to hit it once and it stays corrupted.

Did you try again with your original repos?
Posts: 347
Silent Observer
Joined: 08 Aug 2013
#13
Yes, I ran apt-get clean, changed back to my default US repos, and though the apt-get update took longer than usual, the process completed successfully.

While not difficult to fix if you know what to do, it seems to me that if this happens often enough that someone knows what to do when it happens, it's a reproducible bug in some part of the apt subsystem (and carries through into Synaptic, which appears to be just a GUI front-end for apt) -- shouldn't apt be able to detect and correct this kind of index corruption?
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#14
Silent Observer wrote:Yes, I ran apt-get clean, changed back to my default US repos, and though the apt-get update took longer than usual, the process completed successfully.

shouldn't apt be able to detect and correct this kind of index corruption?
Well I would think the answer is"Yes, it should".