Bug 617926 - Yum fails with: ValueError: bad marshal data
Yum fails with: ValueError: bad marshal data
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Dave Malcolm
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-24 21:27 EDT by Bruce Brackbill
Modified: 2014-01-21 18:16 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-26 10:08:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bruce Brackbill 2010-07-24 21:27:01 EDT
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 00:06:57 EDT
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 10:08:35 EDT
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 13:14:07 EDT
I tested the ram yesterday with the fedora liveCD and there were no errors.
Comment 4 Joshua Roys 2010-08-09 07:55:51 EDT
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 09:59:30 EDT
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 11:33:24 EDT
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 12:23:54 EDT
Strange and maybe totally unrelated, but after cron ran prelink it started working again.
Comment 8 seth vidal 2010-11-04 13:49:47 EDT
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.