Making apt race-free

Robie Basak robie.basak at
Mon Jul 9 10:39:47 UTC 2012

I've been working with Scott Moser on fixing the "Hash Sum mismatch"
errors we get during "apt-get update". There was a UDS session on this.

We have prepared a proof-of-concept that fixes the problem, and written
up details here:

So far, we have:
   * Patches for debootstrap and apt that cause them to operate in this
   * new race-free mode
   * Mirror script modifications to provide a race-free repository
   * A (currently private) mirror that works against this (with the
   * by-hash directory added)

The Debian discussion does not seem to have come to any kind of
conclusion. We want a fix in Ubuntu this cycle. With our plan, we're in
a position to get this fixed in Ubuntu without much effort to switch if
Debian fix it some other way.

Note that the current patches are for a PoC and for testing the concept
only - they are not ready for production:


PPA builds of patched apt and debootstrap: ppa:~racb/experimental

The next step will be to start testing all of this. But before we
continue, we'd like feedback on the work so far. In particular, I'd like
to hear comments on the scheme that we are using to fix this problem, as
detailed in the wiki, and thoughts on an appropriate fallback scheme.

Your comments?


More information about the ubuntu-devel mailing list