Bug 38454
| Summary: | RPM 4.0.2-7x database corruption | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | redhat-bugs | ||||||
| Component: | rpm | Assignee: | Jeff Johnson <jbj> | ||||||
| Status: | CLOSED WORKSFORME | QA Contact: | David Lawrence <dkl> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.0 | ||||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | i386 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2001-05-07 01:13:05 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
redhat-bugs
2001-04-30 19:31:55 UTC
Can you attach a tar ball of your database cd /var/lib tar czvf /tmp/rpmdb-38454.tar.gz rpm to this bug, and I'll take a look? Thanks. Created attachment 17486 [details]
tarball of the RPM database causing this trouble
Here's the start of the problem. The script cd /var/lib/rpm for i in * do echo $i ---- db_verify $i done gives output: db_verify: First overflow page 2814 has a prev_pgno db_verify: Overflow item incomplete on page 2862 db_verify: Overflow page 2814 has bogus prev_pgno value db_verify: Page 2814 encountered twice in overflow traversal db_verify: First overflow page 2814 has a prev_pgno db_verify: Page 2814 encountered twice in overflow traversal db_verify: First overflow page 2814 has a prev_pgno db_verify: Page 2814 encountered twice in overflow traversal db_verify: First overflow page 2814 has a prev_pgno db_verify: Page 2814 encountered twice in overflow traversal db_verify: First overflow page 2814 has a prev_pgno db_verify: Page 2814 encountered twice in overflow traversal db_verify: DB->verify: Packages.old: DB_VERIFY_BAD: Database verification failed Fix or workaround coming in a bit ... OK, you have several bad records, all occurred someplace near ... kernel-2.2.19-7.0.1.2.2mvd Wed 25 Apr 2001 10:14:38 PM EDT up2date-gnome-2.5.4-1 Wed 25 Apr 2001 10:09:50 PM EDT up2date-2.5.4-1 Wed 25 Apr 2001 10:09:45 PM EDT rhn_register-gnome-1.3.2-1 Wed 25 Apr 2001 10:09:44 PM EDT rhn_register-1.3.2-1 Wed 25 Apr 2001 10:09:43 PM EDT python-xmlrpc-1.4-1 Wed 25 Apr 2001 10:09:42 PM EDT ========== HERE ============= abisuite-0.7.13-ximian.6 Wed 25 Apr 2001 06:06:11 PM EDT gnome-audio-1.4.0-ximian.1 Wed 25 Apr 2001 06:06:05 PM EDT gnome-audio-1.0.0-12 Wed 25 Apr 2001 06:06:03 PM EDT abisuite-0.7.13-ximian.6 Wed 25 Apr 2001 06:04:53 PM EDT nautilus-trilobite-1.0.1.1-ximian.12 Wed 25 Apr 2001 05:57:25 PM EDT Here's how to fix: 1) Fix the database damage (and save a copy) by doing (as root, you need db3-utils) cd /var/lib/rpm mv Packages Packages.old db_dump Packages.old | db_load Packages 2) Get a copy of the attached toy program, and compile by doing (you need db3-devel) cc -o t38454 t38454.c -ldb-3.1 3) Run the program as root t38454 4) Do a rpm -qa, then a rpm --rebuilddb. Created attachment 17528 [details]
t38454.c will delete bad records
Reopen the bug if you need more ... Works great! Thanks Jeff! *** Bug 40066 has been marked as a duplicate of this bug. *** *** Bug 41793 has been marked as a duplicate of this bug. *** *** Bug 41054 has been marked as a duplicate of this bug. *** *** Bug 55396 has been marked as a duplicate of this bug. *** |