Bug 617926 - Yum fails with: ValueError: bad marshal data
Summary: Yum fails with: ValueError: bad marshal data
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-25 01:27 UTC by Bruce Brackbill
Modified: 2014-01-21 23:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-26 14:08:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Bruce Brackbill 2010-07-25 01:27:01 UTC
Running yum update errors with:

[root@localhost ~]# yum update
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 51, in <module>
    import transactioninfo
  File "/usr/lib/python2.6/site-packages/yum/transactioninfo.py", line 31, in <module>
    from sqlitesack import YumAvailablePackageSqlite
  File "/usr/lib/python2.6/site-packages/yum/sqlitesack.py", line 26, in <module>
    import yumRepo
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 39, in <module>
    import metalink
  File "/usr/lib/python2.6/site-packages/yum/metalink.py", line 25, in <module>
    from urlgrabber.progress import format_number
ValueError: bad marshal data

[root@localhost ~]# rpm -q python yum rpm
python-2.6.4-27.fc13.i686
yum-3.2.27-4.fc13.noarch
rpm-4.8.1-2.fc13.i686

Comment 1 Bruce Brackbill 2010-07-25 04:06:57 UTC
I took these steps:

1) Temporarily renamed metalink.pyc and metalink.pyo
2) Ran yum update again
3) metalink.pyc was auto generated
4) Got the same error again
5) Deleted the newly created metalink.pyc
6) Renamed metalink.pyc and metalink.pyo back to their old names
7) Ran yum update again and it worked

[root@localhost yum]# ls -la | grep metalink
-rw-r--r--.  1 root root   9403 May  3 08:53 metalink.py
-rw-r--r--.  1 root root   9079 May  3 08:53 metalink.pyc
-rw-r--r--.  1 root root   9009 May  3 08:53 metalink.pyo

By the way rpm -V python never showed any errors.

Comment 2 seth vidal 2010-07-26 14:08:35 UTC
So the error here seems to becoming when it imports from urlgrabber. And you say it has not happened again? I worry that you may be having some sort of random memory issue. Have you tried running some sort of ram-checking software or bios utility?

but so far I don't think this is a bug.

reopen if you have more info.

Comment 3 Bruce Brackbill 2010-07-26 17:14:07 UTC
I tested the ram yesterday with the fedora liveCD and there were no errors.

Comment 4 Joshua Roys 2010-08-09 11:55:51 UTC
Just FYI, I had a similar traceback this morning:

# yum update yum
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 24, in <module>
    import re
ValueError: bad marshal data

# yum -v update yum
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 24, in <module>
    import re
ValueError: bad marshal data

# yum repolist
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 24, in <module>
    import re
ValueError: bad marshal data

# yum clean expire-cache
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 24, in <module>
    import re
ValueError: bad marshal data

# rpm -V python | fpaste
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "/usr/bin/fpaste", line 23, in <module>
    import os, sys, urllib, urllib2
  File "/usr/lib/python2.6/urllib.py", line 25, in <module>
    import string
  File "/usr/lib/python2.6/string.py", line 83, in <module>
    import re as _re
ValueError: bad marshal data

# rpm -V python
..5......    /usr/lib/python2.6/re.pyc
..5......    /usr/lib/python2.6/re.pyo


When I moved the re.py{c,o} files out of the way, yum worked again.

Comment 5 seth vidal 2010-08-09 13:59:30 UTC
Joshua,
 It's a similar error from python -but that appears to be the main python pkg that is having the corruption.

Comment 6 Bruce Brackbill 2010-10-22 15:33:24 UTC
happened again today

[root@localhost ~]# yum update
Traceback (most recent call last):
  File "/usr/bin/yum", line 4, in <module>
    import yum
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 35, in <module>
    import yum.i18n
ValueError: bad marshal data
[root@localhost ~]#

Comment 7 Bruce Brackbill 2010-10-22 16:23:54 UTC
Strange and maybe totally unrelated, but after cron ran prelink it started working again.

Comment 8 seth vidal 2010-11-04 17:49:47 UTC
reassigning to python but this could be prelink-ism.


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