Bug 51836 - RPM db bad
RPM db bad
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-15 14:04 EDT by Kim Bisgaard
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-29 02:43:20 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)
/var/lib/rpm (5.59 MB, application/octet-stream)
2001-08-15 16:18 EDT, Kim Bisgaard
no flags Details

  None (edit)
Description Kim Bisgaard 2001-08-15 14:04:14 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010802

Description of problem:
rpm seg.faults I have done a db_verify Packages:
db_verify: Overflow page 2463 of invalid type
db_verify: DB->verify: Packages.old.2: DB_VERIFY_BAD: Database verification
failed

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

How reproducible:
Always

Steps to Reproduce:
1.db_verify /var/lib/rpm/Packages
2.
3.
	

Actual Results:  db_verify: Overflow page 2463 of invalid type
db_verify: DB->verify: Packages.old.2: DB_VERIFY_BAD: Database verification
failed

Additional info:
Comment 1 Kim Bisgaard 2001-08-15 15:22:03 EDT
I have tried to upload (attach) a tar of the /var/lib/rpm dir, but modem, isp,
Mozilla og bugzilla won't play ball - sorry.
Comment 2 Kim Bisgaard 2001-08-15 16:18:08 EDT
Created attachment 28016 [details]
/var/lib/rpm
Comment 3 Jeff Johnson 2001-08-15 16:41:38 EDT
Recreate Packages using db_dump/db_load:

	cd /var/lib/rpm
	mv Packages Packages-ORIG
	db_dump Packages-ORIG | db_load Packages
Comment 4 Kim Bisgaard 2001-08-16 11:33:41 EDT
Ok I have already tried that, but when I do a rpm -qa I get:
ZIP .... ZIP
kernel-2.4.2-2
portmap-4.0-35
pump-0.8.11-1
VFlib2-2.25.1-12
ypbind-1.7-6
autorun-2.65-1
Segmentation fault (core dumped)

I have tried to run the litle program you made for another similiar bug, to
delete bad records. It outputs:
fix record[0] at #562 --
db: get key: 0xbffffa30[4] = 0x232, data at 0x804e2c0[5352].
db: del key: 0xbffffa30[4] = 0x232, data at 0x804e2c0[5352].
fix record[1] at #566 --
db: get key: 0xbffffa30[4] = 0x236, data at 0x804e2c0[5940].
db: del key: 0xbffffa30[4] = 0x236, data at 0x804e2c0[5940].
fix record[2] at #559 --
db: get key: 0xbffffa30[4] = 0x22f, data at 0x804e2c0[5644].
db: del key: 0xbffffa30[4] = 0x22f, data at 0x804e2c0[5644].
fix record[3] at #561 --
db: get key: 0xbffffa30[4] = 0x231, data at 0x804e2c0[3200].
db: del key: 0xbffffa30[4] = 0x231, data at 0x804e2c0[3200].
fix record[4] at #563 --
db: get key: 0xbffffa30[4] = 0x233, data at 0x804e2c0[8212].
db: del key: 0xbffffa30[4] = 0x233, data at 0x804e2c0[8212].
fix record[5] at #560 --
db: get key: 0xbffffa30[4] = 0x230, data at 0x804e2c0[14404].
db: del key: 0xbffffa30[4] = 0x230, data at 0x804e2c0[14404].
fix record[6] at #564 --
db: get key: 0xbffffa30[4] = 0x234, data at 0x804e2c0[9576].
db: del key: 0xbffffa30[4] = 0x234, data at 0x804e2c0[9576].

but rpm -qa still seg.faults at the same place.

rpm -vv -rebuilddb goes:
ZIP ... ZIP
D:   +++        350 ypbind-1.7-6
D: adding "ypbind" to Name index.
D: adding 9 entries to Basenames index.
D: adding "System Environment/Daemons" to Group index.
D: adding 21 entries to Requirename index.
D: adding 1 entries to Providename index.
D:   +++        351 autorun-2.65-1
D: adding "autorun" to Name index.
D: adding 11 entries to Basenames index.
D: adding "Applications/System" to Group index.
D: adding 9 entries to Requirename index.
D: adding 1 entries to Providename index.
Segmentation fault (core dumped)
Comment 5 Jeff Johnson 2001-08-16 11:38:34 EDT
OK, give me a pointer (i.e. URL, bugzilla attachments won't work) to a tarball
of your database
	cd /var/lib
	tar czvf /tmp/rpmdb3-51836.tar.gz rpm
and I'll figger what's up.
Comment 6 Kim Bisgaard 2001-08-16 11:42:59 EDT
I will get you one tomorrow, but why does bugzilla attachment not work - what
use is it then??
Comment 7 Jeff Johnson 2001-08-16 11:44:23 EDT
Attachments work fine, but can't handle 5Mb+ rpm databases.
Comment 8 Kim Bisgaard 2001-08-17 02:37:33 EDT
The bzip2'ed tar of /var/lib/rpm can now be found at:
ftp://ftp.dmi.dk/pub/oersted/rpm.tar.bz2
Comment 9 Kim Bisgaard 2001-08-29 02:43:16 EDT
Hi jbj,

I am aware that this could possibly be a bug that you are not obliged to
correct, and I am thankful that you have offered to correct it anyway. Is there
anything I could do, to get around this bug? Some db editing tools around so
that I can correct my db myself?

Best regards,
Comment 10 Jeff Johnson 2001-08-30 09:01:30 EDT
Sorry for the delay, I lost you in the MODIFIED state.

I've repaired (by doing a rpm --rebuilddb with rpm-4.0.3)
your database. Your rpm/Packages file and a log are at
	ftp://people.redhat.com/jbj/rpmdb3-51836-FIX.tar.gz
Do the following
	cd /var/lib/rpm
	mv Packages Packages-ORIG
	cd ..
	tar xzvf rpmdb3-51836-FIX.tar.gz
	rpm --rebuilddb

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