"Hash Sum mismatch" on apt-get update repeatedly causing builds to fail

At https://travis-ci.org/mit-plv/fiat-crypto/jobs/470662505,

Get:1 http://security.ubuntu.com/ubuntu trusty-security InRelease [65.9 kB]
Hit:2 http://dl.hhvm.com/ubuntu trusty InRelease
Hit:4 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu trusty InRelease
Hit:6 http://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Hit:3 http://dl.bintray.com/apache/cassandra 39x InRelease
Ign:7 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 InRelease
Hit:8 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release
Ign:9 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:10 http://dl.google.com/linux/chrome/deb stable Release
Ign:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu trusty InRelease
Hit:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu trusty-updates InRelease
Hit:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu trusty-backports InRelease
Hit:14 http://us-east-1.ec2.archive.ubuntu.com/ubuntu trusty Release
Ign:5 http://toolbelt.heroku.com/ubuntu ./ InRelease
Hit:15 http://toolbelt.heroku.com/ubuntu ./ Release
Get:16 http://security.ubuntu.com/ubuntu trusty-security/main Sources [213 kB]
Get:17 http://security.ubuntu.com/ubuntu trusty-security/restricted Sources [5,050 B]
Get:18 http://security.ubuntu.com/ubuntu trusty-security/universe Sources [117 kB]
Ign:19 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty InRelease
Err:18 http://security.ubuntu.com/ubuntu trusty-security/universe Sources
Hash Sum mismatch
Hit:20 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Hit:21 http://ppa.launchpad.net/jgross-h/many-coq-versions/ubuntu trusty InRelease
Hit:22 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
Hit:23 http://ppa.launchpad.net/pollinate/ppa/ubuntu trusty InRelease
Hit:24 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty InRelease
Hit:25 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Get:26 http://security.ubuntu.com/ubuntu trusty-security/multiverse Sources [3,070 B]
Get:27 http://security.ubuntu.com/ubuntu trusty-security/main amd64 Packages [986 kB]
Get:28 http://security.ubuntu.com/ubuntu trusty-security/main i386 Packages [900 kB]
Ign:28 http://security.ubuntu.com/ubuntu trusty-security/main i386 Packages
Get:29 http://security.ubuntu.com/ubuntu trusty-security/main Translation-en [517 kB]
Ign:29 http://security.ubuntu.com/ubuntu trusty-security/main Translation-en
Get:30 http://security.ubuntu.com/ubuntu trusty-security/restricted amd64 Packages [18.1 kB]
Get:31 http://security.ubuntu.com/ubuntu trusty-security/restricted i386 Packages [17.8 kB]
Get:32 http://security.ubuntu.com/ubuntu trusty-security/restricted Translation-en [3,272 B]
Get:33 http://security.ubuntu.com/ubuntu trusty-security/universe amd64 Packages [352 kB]
Ign:33 http://security.ubuntu.com/ubuntu trusty-security/universe amd64 Packages
Get:34 http://security.ubuntu.com/ubuntu trusty-security/universe i386 Packages [336 kB]
Hit:35 https://packagecloud.io/computology/apt-backport/ubuntu trusty InRelease
Hit:36 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease
Hit:37 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu trusty InRelease
Hit:38 https://download.docker.com/linux/ubuntu trusty InRelease
Get:39 http://security.ubuntu.com/ubuntu trusty-security/universe Translation-en [190 kB]
Ign:39 http://security.ubuntu.com/ubuntu trusty-security/universe Translation-en
Hit:42 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty Release
Get:28 http://security.ubuntu.com/ubuntu trusty-security/main i386 Packages [725 kB]
Ign:28 http://security.ubuntu.com/ubuntu trusty-security/main i386 Packages
Get:29 http://security.ubuntu.com/ubuntu trusty-security/main Translation-en [426 kB]
Ign:29 http://security.ubuntu.com/ubuntu trusty-security/main Translation-en
Get:33 http://security.ubuntu.com/ubuntu trusty-security/universe amd64 Packages [276 kB]
Get:39 http://security.ubuntu.com/ubuntu trusty-security/universe Translation-en [149 kB]
Err:28 http://security.ubuntu.com/ubuntu trusty-security/main i386 Packages
Writing more data than expected (726001 > 725162)
Err:29 http://security.ubuntu.com/ubuntu trusty-security/main Translation-en
Writing more data than expected (426672 > 425967)
Fetched 117 kB in 4s (24.3 kB/s)
Reading package lists...
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/universe/source/Sources.gz Hash Sum mismatch
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/binary-i386/Packages Writing more data than expected (726001 > 725162)
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/i18n/Translation-en Writing more data than expected (426672 > 425967)
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: update failed

There was another build that I had to restart about a dozen times this morning before the error went away.

This is still (again?) an issue! See https://travis-ci.org/mit-plv/fiat-crypto/jobs/595262978 for example:

$ travis_retry ./etc/ci/sudo-apt-get-update.sh -q
Hit:1 http://security.ubuntu.com/ubuntu trusty-security InRelease
Hit:2 http://dl.hhvm.com/ubuntu trusty InRelease
Hit:5 http://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Hit:6 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu trusty InRelease
Hit:3 http://dl.bintray.com/apache/cassandra 39x InRelease
Ign:7 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 http://dl.google.com/linux/chrome/deb stable Release
Ign:9 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 InRelease
Hit:10 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release
Ign:4 http://heroku-toolbelt.s3.amazonaws.com/apt ./ InRelease
Hit:11 http://heroku-toolbelt.s3.amazonaws.com/apt ./ Release
Ign:12 http://archive.ubuntu.com/ubuntu trusty InRelease
Get:13 http://archive.ubuntu.com/ubuntu trusty-updates InRelease [65.9 kB]
Hit:14 http://archive.ubuntu.com/ubuntu trusty-backports InRelease
Hit:15 http://archive.ubuntu.com/ubuntu trusty Release
Ign:16 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty InRelease
Hit:17 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Get:18 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty InRelease [16.0 kB]
Hit:19 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
Hit:20 http://ppa.launchpad.net/pollinate/ppa/ubuntu trusty InRelease
Hit:21 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty InRelease
Hit:22 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Hit:23 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty Release
Hit:24 https://download.docker.com/linux/ubuntu trusty InRelease
Get:28 http://archive.ubuntu.com/ubuntu trusty-updates/main Sources [532 kB]
Get:29 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Sources [6,444 B]
Get:30 http://archive.ubuntu.com/ubuntu trusty-updates/universe Sources [288 kB]
Get:31 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Sources [7,389 B]
Get:33 http://archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages [1,460 kB]
Get:34 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages [1,355 kB]
Err:34 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages
  Hash Sum mismatch
Get:35 http://archive.ubuntu.com/ubuntu trusty-updates/main Translation-en [701 kB]
Get:36 http://archive.ubuntu.com/ubuntu trusty-updates/restricted amd64 Packages [21.4 kB]
Get:37 http://archive.ubuntu.com/ubuntu trusty-updates/restricted i386 Packages [21.1 kB]
Get:38 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Translation-en [3,706 B]
Get:39 http://archive.ubuntu.com/ubuntu trusty-updates/universe amd64 Packages [671 kB]
Get:40 http://archive.ubuntu.com/ubuntu trusty-updates/universe i386 Packages [646 kB]
Get:41 http://archive.ubuntu.com/ubuntu trusty-updates/universe Translation-en [347 kB]
Get:42 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse amd64 Packages [16.1 kB]
Get:43 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse i386 Packages [16.6 kB]
Get:44 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Translation-en [7,680 B]
Hit:45 https://packagecloud.io/computology/apt-backport/ubuntu trusty InRelease
Get:46 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty/main amd64 Packages [4,265 B]
Get:47 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty/main i386 Packages [4,268 B]
Get:48 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty/main Translation-en [3,451 B]
Get:50 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease [23.2 kB]
Ign:50 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease
Hit:51 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu trusty InRelease
Fetched 1,406 kB in 1s (797 kB/s)
Reading package lists...
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: The repository 'https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease' is not signed.
W: There is no public key available for the following key IDs:
6B05F25D762E3157  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: update failed
The command "./etc/ci/sudo-apt-get-update.sh -q" failed. Retrying, 2 of 3.
Hit:1 http://security.ubuntu.com/ubuntu trusty-security InRelease
Hit:2 http://dl.hhvm.com/ubuntu trusty InRelease
Hit:4 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu trusty InRelease
Hit:6 http://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Hit:3 http://dl.bintray.com/apache/cassandra 39x InRelease
Ign:7 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 InRelease
Hit:8 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release
Ign:9 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:10 http://dl.google.com/linux/chrome/deb stable Release
Ign:5 http://heroku-toolbelt.s3.amazonaws.com/apt ./ InRelease
Hit:11 http://heroku-toolbelt.s3.amazonaws.com/apt ./ Release
Ign:12 http://archive.ubuntu.com/ubuntu trusty InRelease
Ign:13 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty InRelease
Get:14 http://archive.ubuntu.com/ubuntu trusty-updates InRelease [65.9 kB]
Hit:15 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Hit:16 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty InRelease
Hit:17 http://archive.ubuntu.com/ubuntu trusty-backports InRelease
Hit:18 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
Hit:19 http://archive.ubuntu.com/ubuntu trusty Release
Hit:20 http://ppa.launchpad.net/pollinate/ppa/ubuntu trusty InRelease
Hit:21 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty InRelease
Hit:22 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Hit:23 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty Release
Hit:24 https://download.docker.com/linux/ubuntu trusty InRelease
Get:28 http://archive.ubuntu.com/ubuntu trusty-updates/main Sources [532 kB]
Get:29 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Sources [6,444 B]
Get:30 http://archive.ubuntu.com/ubuntu trusty-updates/universe Sources [288 kB]
Get:31 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Sources [7,389 B]
Get:32 http://archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages [1,460 kB]
Get:33 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages [1,355 kB]
Err:33 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages
  Hash Sum mismatch
Get:34 http://archive.ubuntu.com/ubuntu trusty-updates/main Translation-en [701 kB]
Get:35 http://archive.ubuntu.com/ubuntu trusty-updates/restricted amd64 Packages [21.4 kB]
Get:36 http://archive.ubuntu.com/ubuntu trusty-updates/restricted i386 Packages [21.1 kB]
Get:37 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Translation-en [3,706 B]
Get:38 http://archive.ubuntu.com/ubuntu trusty-updates/universe amd64 Packages [671 kB]
Get:39 http://archive.ubuntu.com/ubuntu trusty-updates/universe i386 Packages [646 kB]
Get:40 http://archive.ubuntu.com/ubuntu trusty-updates/universe Translation-en [347 kB]
Get:41 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse amd64 Packages [16.1 kB]
Get:42 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse i386 Packages [16.6 kB]
Get:43 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Translation-en [7,680 B]
Hit:44 https://packagecloud.io/computology/apt-backport/ubuntu trusty InRelease
Get:46 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease [23.2 kB]
Ign:46 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease
Hit:48 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu trusty InRelease
Fetched 1,444 kB in 1s (873 kB/s)
Reading package lists...
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: The repository 'https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease' is not signed.
W: There is no public key available for the following key IDs:
6B05F25D762E3157  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: update failed
The command "./etc/ci/sudo-apt-get-update.sh -q" failed. Retrying, 3 of 3.
Hit:1 http://dl.hhvm.com/ubuntu trusty InRelease
Hit:2 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu trusty InRelease
Hit:4 http://security.ubuntu.com/ubuntu trusty-security InRelease
Hit:6 http://apt.postgresql.org/pub/repos/apt trusty-pgdg InRelease
Hit:5 http://dl.bintray.com/apache/cassandra 39x InRelease
Ign:7 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 InRelease
Hit:8 http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 Release
Ign:3 http://heroku-toolbelt.s3.amazonaws.com/apt ./ InRelease
Hit:9 http://heroku-toolbelt.s3.amazonaws.com/apt ./ Release
Ign:10 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty InRelease
Hit:11 http://ppa.launchpad.net/git-core/ppa/ubuntu trusty InRelease
Hit:12 http://ppa.launchpad.net/jgross-h/coq-8.10-daily/ubuntu trusty InRelease
Hit:13 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty InRelease
Ign:14 http://archive.ubuntu.com/ubuntu trusty InRelease
Hit:15 http://ppa.launchpad.net/pollinate/ppa/ubuntu trusty InRelease
Hit:16 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu trusty InRelease
Get:17 http://archive.ubuntu.com/ubuntu trusty-updates InRelease [65.9 kB]
Hit:18 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease
Hit:19 http://ppa.launchpad.net/couchdb/stable/ubuntu trusty Release
Hit:20 http://archive.ubuntu.com/ubuntu trusty-backports InRelease
Hit:21 http://archive.ubuntu.com/ubuntu trusty Release
Hit:22 https://download.docker.com/linux/ubuntu trusty InRelease
Ign:25 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:26 http://dl.google.com/linux/chrome/deb stable Release
Get:27 http://archive.ubuntu.com/ubuntu trusty-updates/main Sources [532 kB]
Get:28 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Sources [6,444 B]
Hit:29 https://packagecloud.io/computology/apt-backport/ubuntu trusty InRelease
Get:30 http://archive.ubuntu.com/ubuntu trusty-updates/universe Sources [288 kB]
Get:31 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Sources [7,389 B]
Get:33 http://archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages [1,460 kB]
Get:34 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages [1,355 kB]
Err:34 http://archive.ubuntu.com/ubuntu trusty-updates/main i386 Packages
  Hash Sum mismatch
Get:35 http://archive.ubuntu.com/ubuntu trusty-updates/main Translation-en [701 kB]
Get:36 http://archive.ubuntu.com/ubuntu trusty-updates/restricted amd64 Packages [21.4 kB]
Get:37 http://archive.ubuntu.com/ubuntu trusty-updates/restricted i386 Packages [21.1 kB]
Get:38 http://archive.ubuntu.com/ubuntu trusty-updates/restricted Translation-en [3,706 B]
Get:39 http://archive.ubuntu.com/ubuntu trusty-updates/universe amd64 Packages [671 kB]
Get:41 http://archive.ubuntu.com/ubuntu trusty-updates/universe i386 Packages [646 kB]
Get:42 http://archive.ubuntu.com/ubuntu trusty-updates/universe Translation-en [347 kB]
Get:43 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse amd64 Packages [16.1 kB]
Get:44 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse i386 Packages [16.6 kB]
Get:45 http://archive.ubuntu.com/ubuntu trusty-updates/multiverse Translation-en [7,680 B]
Get:46 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease [23.2 kB]
Ign:46 https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease
Hit:48 https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu trusty InRelease
Fetched 1,378 kB in 1s (886 kB/s)
Reading package lists...
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: The repository 'https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease' is not signed.
W: There is no public key available for the following key IDs:
6B05F25D762E3157  
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: update failed
The command "./etc/ci/sudo-apt-get-update.sh -q" failed 3 times.
The command "travis_retry ./etc/ci/sudo-apt-get-update.sh -q" failed and exited with 1 during .
Your build has been stopped.