I think we're making some progress on identifying issues similar to
that, it turns out that the transaction handling is somewhat broken: If
an `apt update` is cancelled, a partial transaction is committed, as we
have no way to identify if a transaction is complete or not.

The confusing issue here is why we request Packages files that no longer
exist. Fundamentally the problem should not happen because we request
Packages files by their hash; but if we get an outdated hash and it no
longer exists, we obviously are correct to fail.

The question is where we get the outdated hash from. If it's from the
existing InRelease file, then it should not be fetching the file in the
first place because the current copy should be up-to-date.

That being said, the files affected here are files not currently
present: i.e. we have enabled new index types (cnf) as well as
additional components (universe, multiverse, restricted).

I do not believe that the lists are actually in a bad state, rather what
happens is that the mirror is in a bad state: It reports that our
InRelease file is still up-to-date when we perform the If-Modified-Since
request to update it.

That would explain the rest of the outcome: Given that the file is still
up-to-date, a new copy did not appear in partial/ and now we try to
fetch the new index files and fail because they don't exist. Some
confusion there may be which error is reported, i.e. it's possible we
are falling back to requesting by name rather than hash due to the 404
and then end up with the wrong file (hence the size mismatch).

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2107223

Title:
  mirror sync in progress, but the situation improves if `rm -fr
  /var/lib/apt/lists`

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/2107223/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to