Bug 203730

Summary: rpm database corrupted (cannot install packages nor rebuilddb)
Product: [Fedora] Fedora Reporter: David Nielsen <gnomeuser>
Component: rpmAssignee: Dave Jones <davej>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: urgent Docs Contact:
Priority: medium    
Version: rawhideCC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-24 07:43:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
dmesg output none

Description David Nielsen 2006-08-23 14:34:09 UTC
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 15:00:16 UTC
Please attach the output of dmesg from the system following a failed run.  

Comment 2 David Nielsen 2006-08-23 15:18:47 UTC
Created attachment 134724 [details]
dmesg output

Comment 3 Paul Nasrat 2006-08-23 15:24:40 UTC
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 15:33:08 UTC
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 07:43:43 UTC
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.