Bug 845765 - Yum update fails "ValueError: invalid literal for int() with base 10: '-->'"
Yum update fails "ValueError: invalid literal for int() with base 10: '-->'"
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
17
i686 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Fedora Packaging Toolset Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-04 14:38 EDT by Sam Tuke
Modified: 2014-01-21 18:23 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-24 23:02:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
my current version of mirrorlist.txt (4.10 KB, text/plain)
2012-08-07 18:10 EDT, Sam Tuke
no flags Details

  None (edit)
Description Sam Tuke 2012-08-04 14:38:07 EDT
Description of problem:

Yum update fails. Here is the error output:


# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
fedora/metalink                                                                                                                                  |  27 kB     00:00     
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 319, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 144, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 485, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 405, in doCommand
    return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
  File "/usr/share/yum-cli/cli.py", line 890, in updatePkgs
    self.update()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 4364, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1032, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 837, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1013, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 777, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 302, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 127, in doSetup
    self.retrieveAllMD()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 83, in retrieveAllMD
    if repo._async and repo._commonLoadRepoXML(repo):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1324, in _commonLoadRepoXML
    if self._latestRepoXML(local):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1302, in _latestRepoXML
    repomd = self.metalink_data.repomd
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 826, in <lambda>
    metalink_data = property(fget=lambda self: self._getMetalink(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 799, in _getMetalink
    result = ug.urlgrab(url, local, text=self.id + "/metalink")
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1127, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1021, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1118, in retryfunc
    _TH.update(url, fo._amount_read - fo._reget_length, time.time() - tm, None)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2293, in update
    _TH.load()
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 2273, in load
    _TH.hosts[host] = int(speed), int(fail), int(ts)
ValueError: invalid literal for int() with base 10: '-->'


I have disabled some repositories in an effort to fix the problem, but to no effect. Here is a list of the files in /etc/yum.repos.d:

adobe-linux-i386.repo.disabled        preupgrade                         preupgrade-planetcore                 rpmfusion-free-updates-testing.repo
fedora-0ad.repo.disabled              preupgrade-adobe-linux-i386        preupgrade-rpmfusion-free             rpmfusion-nonfree-rawhide.repo
fedora-chromium-stable.repo           preupgrade-fedora                  preupgrade-rpmfusion-free-updates     rpmfusion-nonfree.repo
fedora.repo                           preupgrade-fedora-0ad              preupgrade-rpmfusion-nonfree          rpmfusion-nonfree-updates.repo
fedora-updates.repo                   preupgrade-fedora-0ad-noarch       preupgrade-rpmfusion-nonfree-updates  rpmfusion-nonfree-updates-testing.repo
fedora-updates-testing.repo           preupgrade-fedora-chromium-stable  preupgrade-updates                    russianfedora-free-rawhide.repo.disabled
isv:ownCloud:community.repo.disabled  preupgrade-games                   rpmfusion-free-rawhide.repo           russianfedora-free.repo.disabled
obs-games.repo.disabled               preupgrade-main                    rpmfusion-free.repo                   russianfedora-free-updates.repo.disabled
planetccrma.repo                      preupgrade-planetccrma             rpmfusion-free-updates.repo           russianfedora-free-updates-testing.repo.disabled


Version-Release number of selected component (if applicable):

'yum info yum' also fails with an error.

How reproducible:

Unsure.

Steps to Reproduce:
1.
2.
3.
  
Actual results:

Yum fails to update with error output pasted above.

Expected results:

Usual yum update procedure
Additional info:
Comment 1 Zdeněk Pavlas 2012-08-06 04:02:43 EDT
> _TH.hosts[host] = int(speed), int(fail), int(ts)
> ValueError: invalid literal for int() with base 10: '-->'

Can you grep /var/cache/yum/timedhosts for that pattern, and provide some context?
I currently have no idea why it's there.  This file records mirror speeds from past downloads.  You may remove the offending line, it will probably fix your problem.
Comment 2 Sam Tuke 2012-08-06 10:07:04 EDT
Searching within /var/cache/yum/i386/17/timedhosts for "_TH.hosts[host] = int(speed), int(fail), int(ts)" returned no results. Is that what you meant? I also tried replacing that file with an empty one, but I still get yum errors. Below are the contents of that file:

be.mirror.eurid.eu 1251495 1 1342112802
ftp.rhnet.is 316147 1 1342112487
ftp.lip6.fr 715868 1 1342112511
mirror.karneval.cz 685897 1 1342112461
ftp.cica.es 554010 1 1342112430
fedora.mirror.root.lu 765643 1 1342112576
darkstar.ist.utl.pt 377775 1 1342112750
www.fedora.is 65677 0 1341621173
mirrors.ircam.fr 258012 1 1342112565
fedora.aau.at 642715 1 1342112787
mirror.nl.as6453.net 977584 1 1342112458
ftp.nluug.nl 764012 1 1342112668
mirror.fraunhofer.de 905908 1 1342112790
fedora.intergenia.de 378853 1 1342112782
fedora.fastbull.org 429794 1 1342112772
ftp.free.fr 913137 1 1342112467
mirror.vit.com.tr 260190 1 1342112604
mirror.de.leaseweb.net 516857 1 1342112505
fedora-mirror01.rbc.ru 1037307 1 1342112591
ftp.astral.ro 0 1 1342112396
mirror.uv.es 716116 1 1342112620
ftp.wsisiz.edu.pl 354929 1 1342112586
ccrma.stanford.edu 32658 1 1342656160
ftp.proxad.net 518973 1 1342112720
fedora.riteh.hr 561620 1 1342112800
gd.tuwien.ac.at 433464 1 1342112741
ftp.linux.cz 632983 1 1342112419
repos.fedorapeople.org 12248 1 1342656156
ftp.icm.edu.pl 1575865 0 1341763791
ftp.tudelft.nl 1074510 1 1342112690
ftp-stud.hs-esslingen.de 685102 1 1342112476
mirror.ox.ac.uk 59575 0 1341488982
ftp.uni-kl.de 805987 1 1342112470
mirrors.nl.eu.kernel.org 372328 1 1342112664
vesta.informatik.rwth-aachen.de 1058385 1 1342112507
fedora-mirror02.rbc.ru 505334 1 1342112624
ftp.cru.fr 220817 1 1342112816
mirror2.hs-esslingen.de 1117985 1 1342112432
ftp.fi.muni.cz 537779 1 1342112415
ftp.heanet.ie 472273 1 1342112366
mirror.arlug.ro 61862 1 1342112881
sunsite.mff.cuni.cz 599426 1 1342112630
mirror.nl.leaseweb.net 712126 1 1342112403
alviss.et.tudelft.nl 496903 1 1342112521
ftp.colocall.net 608000 1 1342112736
ftp.upjs.sk 674011 1 1342112401
mirror01.th.ifl.net 792829 0 1341877788
download1.rpmfusion.org 900580 0 1341763787
ftp6.linux.cz 0 2 1342112419
mirror.pmf.kg.ac.rs 766788 1 1342112672
mirrors.coreix.net 80989 0 1341877788
nl.mirror.eurid.eu 851823 1 1342112695
sunsite.icm.edu.pl 432790 1 1342112765
ftp.klid.dk 867713 1 1342112514
mirrors.se.eu.kernel.org 430356 1 1342112644
ftp.crc.dk 901694 1 1342112731
mirror.datacenter.by 469845 1 1342112572
ftp.uni-siegen.de 667131 1 1342112794
mirrors.fedoraproject.org 26252 2 1342656166
ftp.funet.fi 291035 1 1342112447
ftp.ntua.gr 136934 0 1341488987
download.opensuse.org 46812 1 1342656158
fedora.dcc.fc.up.pt 443848 1 1342112500
fedora.uib.no 626732 1 1342112607
fedora.mirror.garr.it 606376 1 1342112677
ftp.cc.uoc.gr 347304 1 1342112655
www.omniture.com --> 0 4 1342656166
mirror.switch.ch 670400 1 1342112464
mirror.root.lu 0 1 1342112576
mirror1.atrpms.net 622013 1 1342112528
mirror.i3d.net 425965 0 1341157514
mirror.yandex.ru 510614 1 1342112410
ftp.uninett.no 283780 1 1342112688
ftp.ciril.fr 340837 1 1342112617
ultra.linux.cz 580485 1 1342112636
fedora.mirrors.ovh.net 704813 1 1342112426
fedora.tu-chemnitz.de 512986 1 1342112474
ftp.udl.es 374546 1 1342112705
mirror2.atrpms.net 799077 1 1342112713
ftp.rz.uni-wuerzburg.de 718440 1 1342112699
fr2.rpmfind.net 549883 1 1342112709
ftp.halifax.rwth-aachen.de 914467 1 1342112424
mirror.bytemark.co.uk 1570724 1 1342112360
linuxdownload.adobe.com 7731 1 1342656151
ftp.byfly.by 415254 1 1342112455
ftp.uni-bayreuth.de 726999 1 1342112492
ftp.solnet.ch 386068 1 1342112728
ftp.informatik.uni-frankfurt.de 518923 1 1342112756
www.nic.funet.fi 558847 1 1342112436
Comment 3 Zdeněk Pavlas 2012-08-06 10:17:49 EDT
Thanks!

The problem is caused by mirror "www.omniture.com -->", somehow " -->" got appended to the host name.  Maybe there's an invalid entry in some mirror list. Could you run this grep and attach results?

$ grep www.omniture.com /var/cache/yum/*/metalink.xml
Comment 4 Sam Tuke 2012-08-06 10:44:03 EDT
Hi, I ran the following commands, grep returned nothing for each:

grep www.omniture.com /var/cache/yum/i386/17/fedora/metalink.xml
grep www.omniture.com /var/cache/yum/i386/17/updates/metalink.xml
grep www.omniture.com /var/cache/yum/i386/16/updates/metalink.xml
grep www.omniture.com /var/cache/yum/i386/16/updates/metalink.xml

Unfortunately "grep www.omniture.com /var/cache/yum/*/metalink.xml" returned "No such file or directory".

However, running "ack -a omniture" from within "/var/cache/yum" revealed the following results. Do I need to remove some of the instances of "-->"?

i386/17/rpmfusion-nonfree-updates/mirrorlist.txt
175:http://www.omniture.com -->
176:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture.js"></script>
177:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture_custom.js"></script>
195://--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img

i386/17/rpmfusion-nonfree/mirrorlist.txt
175:http://www.omniture.com -->
176:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture.js"></script>
177:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture_custom.js"></script>
195://--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img

i386/17/rpmfusion-free-updates/mirrorlist.txt
175:http://www.omniture.com -->
176:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture.js"></script>
177:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture_custom.js"></script>
195://--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img

i386/17/timedhosts
67:www.omniture.com --> 0 4 1342656166

i386/17/rpmfusion-free/mirrorlist.txt
175:http://www.omniture.com -->
176:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture.js"></script>
177:<script language="JavaScript" type="text/javascript" src="/decorators/statistics_omniture_custom.js"></script>
195://--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img
Comment 5 Zdeněk Pavlas 2012-08-06 11:03:22 EDT
So it's being parsed from a bogus mirrorlist...  What's the value of "mirrorlist=" in your rpmfusion repositories? Eg:

~$ grep ^mirrorlist= /etc/yum.repos.d/rpmfusion-free.repo
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-debug-$releasever&arch=$basearch
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-source-$releasever&arch=$basearch
Comment 6 Sam Tuke 2012-08-06 11:54:21 EDT
Output of "grep ^mirrorlist= /etc/yum.repos.d/rpmfusion-free.repo" :

mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-$releasever&arch=$basearch
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-debug-$releasever&arch=$basearch
mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-source-$releasever&arch=$basearch

It looks like the same as yours to me...
Comment 7 Zdeněk Pavlas 2012-08-07 03:42:40 EDT
Thanks, that's all fine.  Maybe, you are behind a proxy that sometimes replaces valid responses with "informative" web pages or links.

Please, open /var/cache/yum/i386/17/rpmfusion-free/mirrorlist.txt in a web browser to see what has been put there, or attach the file to this BZ.
Comment 8 Sam Tuke 2012-08-07 18:10:53 EDT
Created attachment 602872 [details]
my current version of mirrorlist.txt
Comment 9 Sam Tuke 2012-08-07 18:11:56 EDT
It doesn't parse properly in Firefox. Perhaps this is related to the problem? Thanks, Sam.
Comment 10 Zdeněk Pavlas 2012-08-08 04:40:01 EDT
Yeah, it's the login page of your wifi hotspot:

    * Login with my BT account
    * Login with my Fon account
    * Buy access from just £3

1) login properly
2) rm /var/cache/yum/i386/17/*/mirrorlist.txt
3) sed -i /omniture.com/d /var/cache/yum/i386/17/timedhosts
4) now you should be able to run yum..

I've made the mirror parsing in Yum a bit more robust, not to pick that random noise again.  2) and 3) won't be necessary in the next release.
Comment 11 Sam Tuke 2012-08-08 18:06:58 EDT
Thanks! Yes, your steps worked. I don't understand exactly what caused the issue, but I'm grateful that in the next release all that will be required is deleting a single file. Thanks for your persistent assistance above!
Comment 12 Fedora Update System 2012-08-09 04:20:42 EDT
python-urlgrabber-3.9.1-15.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/python-urlgrabber-3.9.1-15.fc17
Comment 13 Fedora Update System 2012-08-09 19:25:47 EDT
Package python-urlgrabber-3.9.1-15.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-urlgrabber-3.9.1-15.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11659/python-urlgrabber-3.9.1-15.fc17
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2012-08-10 04:42:20 EDT
python-urlgrabber-3.9.1-16.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/python-urlgrabber-3.9.1-16.fc17
Comment 15 Fedora Update System 2012-08-17 16:17:04 EDT
yum-3.4.3-32.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/yum-3.4.3-32.fc18
Comment 16 Fedora Update System 2012-08-24 23:02:01 EDT
python-urlgrabber-3.9.1-16.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Muhammad Negm 2012-08-27 00:13:22 EDT
actually it started today for me :


here's what i got :
muhammad@ravingeek:~/Downloads$ sudo rpm -Uvh python-urlgrabber-3.9.1-16.fc17.noarch.rpm 
[sudo] password for muhammad: 
Preparing...                ########################################### [100%]
   1:python-urlgrabber      ########################################### [100%]
muhammad@ravingeek:~/Downloads$ sudo yum update
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit, yum-fast-
              : downloader

Loading mirror speeds from cached hostfile
 * fedora: ftp.informatik.uni-frankfurt.de
 * rpmfusion-free: mirrors.coreix.net
 * rpmfusion-free-updates: mirrors.coreix.net
 * rpmfusion-nonfree: mirrors.coreix.net
 * rpmfusion-nonfree-updates: mirrors.coreix.net
 * updates: mirror.bytemark.co.uk
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 319, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 144, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 485, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 405, in doCommand
    return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
  File "/usr/share/yum-cli/cli.py", line 890, in updatePkgs
    self.update()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 4364, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1032, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 837, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1013, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 777, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 341, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 225, in populate
    xml = repo_get_function()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1720, in getPrimaryXML
    return self.retrieveMD('primary')
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1643, in retrieveMD
    return self._retrieveMD(mdtype)
  File "/usr/lib/yum-plugins/yum-fast-downloader.py", line 171, in myRetrieveMD
    except Errors.RepoError:
NameError: global name 'Errors' is not defined
Comment 18 Fedora Update System 2012-08-27 06:52:54 EDT
yum-3.4.3-34.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/yum-3.4.3-34.fc18
Comment 19 Muhammad Negm 2012-08-27 16:12:52 EDT
REMOVING yum fastest mirror solves the whole issue
Comment 20 Fedora Update System 2012-08-28 19:35:04 EDT
yum-3.4.3-36.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/yum-3.4.3-36.fc18

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