Bug 203730 - rpm database corrupted (cannot install packages nor rebuilddb)
rpm database corrupted (cannot install packages nor rebuilddb)
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
x86_64 Linux
medium Severity urgent
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-23 10:34 EDT by David Nielsen
Modified: 2015-01-04 17:28 EST (History)
2 users (show)

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


Attachments (Terms of Use)
dmesg output (80.64 KB, text/plain)
2006-08-23 11:18 EDT, David Nielsen
no flags Details

  None (edit)
Description David Nielsen 2006-08-23 10:34:09 EDT
Description of problem:
I did a netinstall of 20060822 and when the system booted I was greeted with the
following error from yum (and underlying rpm)

Loading "installonlyn" plugin
rpmdb: read: 0x7fff5b8d5bb0, 512: Input/output error
rpmdb: /var/lib/rpm/Packages: Input/output error
rpmdb: write: 0xb3dd80, 4096: Bad file descriptor
error: cannot open Packages index using db3 - Bad file descriptor (9)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 183, in getOptionsConfig
    errorlevel=opts.errorlevel)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 124, in
doConfigSetup
    self.conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 612, in readMainConfig
    vars['releasever'] = _getsysver(startupconf.installroot,
startupconf.distroverpkg)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 704, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

and when rebuilding the db:

D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.4031
D: creating directory /var/lib/rpmrebuilddb.4031
D: opening old database with dbapi 3
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
rpmdb: read: 0x7fff86326e20, 512: Input/output error
rpmdb: /var/lib/rpm/Packages: Input/output error
rpmdb: write: 0x625340, 4096: Bad file descriptor
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Bad file descriptor (9)
D: removing directory /var/lib/rpmrebuilddb.4031
D: May free Score board((nil))


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


How reproducible:
100%

Additional info:
AMD64 X2 4400+
Comment 1 Paul Nasrat 2006-08-23 11:00:16 EDT
Please attach the output of dmesg from the system following a failed run.  
Comment 2 David Nielsen 2006-08-23 11:18:47 EDT
Created attachment 134724 [details]
dmesg output
Comment 3 Paul Nasrat 2006-08-23 11:24:40 EDT
We're getting I/O errors

dm-0: rw=0, want=386547056648, limit=41943040 
I/O error in filesystem ("dm-0") meta-data dev dm-0 block 0x5a00000000      
("xfs_trans_read_buf") error 5 buf count 4096
attempt to access beyond end of device

Either kernel/dmraid bug or failing hardware I'd say.
Comment 4 David Nielsen 2006-08-23 11:33:08 EDT
this is a kernel raid setup, I disabled dmraid as it didn't even boot for me.
The RAID is setup by Anaconda so everything should be in order.
Comment 5 David Nielsen 2006-08-24 03:43:43 EDT
I ran every hardware test I could think of and the hardware is fine so I ended
up doing a reinstall from test2 and upgrading to Development and the bug isn't
present. I'm definitely not liking where this is going. Either my brand new
hardware is silently failing somewhere randomly or there's a bug which only
shows up in every other install I do on this machine.. I'm closing the bug, I'll
reopen if the bug reappears.

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