Bug 428855 - apt is reporting "size mismatch", probably downloading wrong file
apt is reporting "size mismatch", probably downloading wrong file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: apt (Show other bugs)
11
All Linux
low Severity high
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On: 512518
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-15 13:07 EST by Leszek Matok
Modified: 2010-02-16 08:08 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.5.15lorg3.95-0.git416.5.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-24 02:42:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
apt-0.5.15lorg3.95.git416-sqlite-bugfix.patch (459 bytes, patch)
2009-07-20 17:33 EDT, Sergey
no flags Details | Diff

  None (edit)
Description Leszek Matok 2008-01-15 13:07:15 EST
Today it hit me on two machines. When I do dist-upgrade, it says:
(...)
Fetched 134MB in 23m24s (95,3kB/s)
Failed to fetch
http://rpm.livna.org/fedora//8/i386//./twolame-0.3.12-1.lvn8.i386.rpm  Size mismatch
There are broken packages. Run `check' to see them.
You can try to fix them automatically with `install --fix-broken'0.
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

There's a typo ("0"), and "install --fix-broken" immediately after this error
message crashes apt-shell (which I'm used to, apt-shell crashes after any
error). But those are not connected to the main bug which hits apt-get and
apt-shell alike.

The problem seems to be caused by a following situation:
- twolame was split into twolame and twolame-libs,
- twolame-libs obsolete older version of twolame (< 0.3.12-1),
- there's a new version of twolame.
It looks like APT is trying to obsolete twolame with twolame-libs and upgrade
twolame to a new version, at the same time, downloads twolame, but expects
twolame-libs or something.

I know at first it looks like broken metadata. But if I do "yum update", it'll
replace twolame with twolame-libs (removing twolame, not downloading it at all),
after which I can apt-get install twolame just fine, no size mismatch this time!
Not only it works in yum, it starts to work in apt when the "obsoletes"
situation is resolved by hand.

This is apt-0.5.15lorg3.93-4.fc8.
Comment 1 Panu Matilainen 2008-01-15 13:57:53 EST
Hum, sounds like an unwanted side-effect from attempted fix of bug 353271. I'll
look into it.
Comment 2 Leszek Matok 2008-02-23 11:22:38 EST
This hit me about two weeks ago in Rawhide:

469 upgraded, 16 newly installed, 2 replaced, 5 removed and 3 not upgraded.
Need to get 70,2kB/872MB of archives.
After unpacking 873MB disk space will be freed.
Get:1 http://download.fedora.redhat.com fedora/linux/development/i386/os/
pkgconfig 1:0.23-2.fc9 [70,2kB]
Fetched 907kB in 8s (104kB/s)                                                   
Failed to fetch
http://download.fedora.redhat.com/pub//fedora/linux/development/i386/os//Packages/python-devel-2.5.1-21.fc9.i386.rpm
 Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

(please note, the reported package and URL is different from the one that really
was downloaded and failed)


And this today in Fedora 8:

Fetched 438MB in 1h6m32s (110kB/s)                                              
Failed to fetch
http://download.fedora.redhat.com/pub//fedora/linux/updates/testing/8/i386//./cpio-2.9-6.fc8.i386.rpm
 Size mismatch
There are broken packages. Run `check' to see them.
You can try to fix them automatically with `install --fix-broken'0.
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

Again, it says cpio is broken, but the fact is that it has a problem with
vim-minimal:

Do you want to continue? [Y/n] 
Get:1 http://download.fedora.redhat.com fedora/linux/updates/testing/8/i386/
vim-minimal 2:7.1.245-1.fc8 [355kB]
Fetched 1B in 0s (3B/s)              
Failed to fetch
http://download.fedora.redhat.com/pub//fedora/linux/updates/testing/8/i386//./cpio-2.9-6.fc8.i386.rpm
 Size mismatch
There are broken packages. Run `check' to see them.
You can try to fix them automatically with `install --fix-broken'0.
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

Again, wrong package is reported, but this time it gives me a hint about which
package is the guild (by re-downloading it). "keep vim-minimal" solved the problem.

Aren't there any updates coming my way? This bug is really annoying.
Comment 3 Bug Zapper 2008-11-26 04:26:53 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Leszek Matok 2008-11-26 11:44:43 EST
I've seen this on F9 until I've moved to F10. For F10, apt doesn't work, so it can't be confirmed.
Comment 5 Sergey 2009-05-27 08:35:25 EDT
I can reproduce this bug in Fedora 10.
The bug is always-reproducible so far. I can test any ideas about it if they are.
Notice, it prints same URIs with different sizes below - the "Size mismatch" source.


# apt-get dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
   dhclient (4.0.0-33.fc10 => 4.0.0-35.fc10)
   libdhcp4client (4.0.0-33.fc10 => 4.0.0-35.fc10)
2 upgraded, 0 newly installed, 0 removed and 0 not upgraded.
Need to get 606kB of archives.
After unpacking 131B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://download.fedora.redhat.com fedora/linux/updates/10/x86_64/ dhclient 12:4.0.0-35.fc10 [318kB]
Get:2 http://download.fedora.redhat.com fedora/linux/updates/10/x86_64/ libdhcp4client 12:4.0.0-35.fc10 [289kB]
Fetched 636kB in 0s (800kB/s)
Failed to fetch http://download.fedora.redhat.com/pub//fedora/linux/updates/10/x86_64//./dhclient-4.0.0-35.fc10.x86_64.rpm  Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


$ apt-get dist-upgrade --print-uris
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
The following packages will be upgraded
   dhclient (4.0.0-33.fc10 => 4.0.0-35.fc10)
   libdhcp4client (4.0.0-33.fc10 => 4.0.0-35.fc10)
2 upgraded, 0 newly installed, 0 removed and 0 not upgraded.
Need to get 606kB of archives.
After unpacking 131B of additional disk space will be used.
Do you want to continue? [Y/n] y
'http://download.fedora.redhat.com/pub//fedora/linux/updates/10/x86_64//./dhclient-4.0.0-35.fc10.x86_64.rpm' dhclient-4.0.0-35.fc10.x86_64.rpm 317776 810a74265f34c52b9780dbf1108e5b07929a1980
'http://download.fedora.redhat.com/pub//fedora/linux/updates/10/x86_64//./dhclient-4.0.0-35.fc10.x86_64.rpm' dhclient-4.0.0-35.fc10.x86_64.rpm 288647 810a74265f34c52b9780dbf1108e5b07929a1980


$ apt-get install --print-uris libdhcp4client
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be upgraded
   libdhcp4client (4.0.0-33.fc10 => 4.0.0-35.fc10)
1 upgraded, 0 newly installed, 0 removed and 1 not upgraded.
Need to get 289kB of archives.
After unpacking 0B of additional disk space will be used.
'http://download.fedora.redhat.com/pub//fedora/linux/updates/10/x86_64//./location_href' location_href 288647 pkgId


apt-0.5.15lorg3.95-0.git416.4.fc10.x86_64
rpm-4.6.0-2.fc10.x86_64
Comment 6 Bug Zapper 2009-06-09 19:22:48 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Leszek Matok 2009-06-28 05:43:13 EDT
It's the same in F11 - but now it looks like it reports all wrong downloads, instead of just few with only some updates, which was the case in F8/F9.
Comment 8 Sergey 2009-07-20 17:33:35 EDT
Created attachment 354394 [details]
apt-0.5.15lorg3.95.git416-sqlite-bugfix.patch

I tracked down the bug. Attached patch fixes it.

Steps to reproduce
==================
Install the package, that is in the last row of fedora-updates/packages table.
In my case it was:
$ sqlite3 /var/lib/apt/lists/download.fedora.redhat.com_pub_fedora_linux_updates*primary.sqlite
sqlite> SELECT COUNT(*) FROM packages;
6651
sqlite> SELECT name,location_href FROM packages LIMIT 6650,10;
libdhcp4client|libdhcp4client-4.0.0-35.fc10.x86_64.rpm
(see my previous message)

Reason
======
Incorrect condition in SqliteQuery::Jump() does not allow seeking to the last record.

Solution
========
Fix the condition.
Comment 9 Fedora Update System 2009-11-20 14:51:28 EST
apt-0.5.15lorg3.95-0.git416.5.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/apt-0.5.15lorg3.95-0.git416.5.fc12
Comment 10 Fedora Update System 2009-11-24 02:42:41 EST
apt-0.5.15lorg3.95-0.git416.5.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2010-02-14 12:22:37 EST
apt-0.5.15lorg3.95-0.git416.5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/apt-0.5.15lorg3.95-0.git416.5.fc11
Comment 12 Fedora Update System 2010-02-16 08:08:32 EST
apt-0.5.15lorg3.95-0.git416.5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.