Bug 103815 - rpm --rebuilddb results in segmentation fault
Summary: rpm --rebuilddb results in segmentation fault
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.3
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-05 10:59 UTC by Thomas Emde
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-19 18:39:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Thomas Emde 2003-09-05 10:59:13 UTC
From Bugzilla Helper:
User-Agent: Opera/7.11 (Windows NT 5.0; U)  [en]

Description of problem:
Trying to solve via the following steps does not help:

db_verify /var/lib/rpm/Packages ends without errors.

Dump and reload Packages (
   cd /var/lib/rpm
   mv Packages Packages-ORIG
   db_dump Packages-ORIG | db_load Packages
)

This does not help.




Version-Release number of selected component (if applicable):
rpm-4.0.4-7x18

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
    

Additional info:

Comment 1 Jeff Johnson 2003-09-05 13:35:39 UTC
Does not hep *how*? What failure are you seeing?

Comment 2 Thomas Emde 2003-09-08 05:25:13 UTC
rpm --rebuilddb -vv:

<many packages being displayed>
.
.

D:   +++        576 SharedWeb-1.0.0-1
D: adding "SharedWeb" to Name index.
D: adding 39 entries to Basenames index.
D: adding "?/?" to Group index.
D: adding 28 entries to Requirename index.
D: adding 36 entries to Providename index.
D: adding 9 entries to Dirnames index.
D: adding 28 entries to Requireversion index.
D: adding 36 entries to Provideversion index.
D: adding 1 entries to Installtid index.
D: adding 1 entries to Sigmd5 index.
D: adding "b147baa5038e6b26ea55035dc0073cd5d043f57b" to Sha1header index.
D: adding 39 entries to Filemd5s index.
Segmentation fault


(SharedWeb is a self-built package).

Comment 3 Thomas Emde 2003-10-09 04:56:33 UTC
Freshening any package results in messages like these:
rpm -Fvh gnupg-1.0.7-7.i386.rpm --repackage
Preparing...                error: rpmdb: damaged header instance #660 
retrieved, skipping.
error: rpmdb: damaged header instance #661 retrieved, skipping.
error: rpmdb: damaged header instance #661 retrieved, skipping.
error: rpmdb: damaged header instance #661 retrieved, skipping.
.
. <snip>
.
error: rpmdb: damaged header instance #717 retrieved, skipping.
error: rpmdb: damaged header instance #719 retrieved, skipping.
error: rpmdb: damaged header instance #719 retrieved, skipping.
########################################### [100%]
Wrote: /var/spool/up2date/gnupg-1.0.6-5.i386.rpm
   1:gnupg                  ########################################### [100%]

Comment 4 Thomas Emde 2003-10-14 14:45:42 UTC
I found out that the rpm db has an inconsistency in so far as there are two 
entries for glibc-common-2.2.5-43 when doing a rpm -qa:

rpm -qa | grep glibc
glibc-common-2.2.5-43
glibc-devel-2.2.5-43
glibc-kernheaders-2.4-7.16
glibc-2.2.5-43
glibc-common-2.2.5-43

How can I remove the second entry from the database? Perhaps my segmentation 
faults will disappear then?!

Comment 5 Thomas Emde 2003-10-17 04:17:13 UTC
I erased glibc-common and got the following:

# rpm -qa | grep glibc
glibc-devel-2.2.5-43
glibc-kernheaders-2.4-7.16
glibc-2.2.5-43
glibc-common-2.2.5-43

# rpm -e glibc-common-2.2.5-43 --nodeps --allmatches
error: package glibc-common-2.2.5-43 is not installed

# rpm --rebuilddb
*** dbiUpdateRecord: uh is NULL
Segmentation fault

So I would very much appreciate a hint on this...

Thank you very much!

Thomas

Comment 6 Thomas Emde 2003-11-03 10:29:05 UTC
Would it make sense to provide you with a zipped version of the 
corrupt rpm database?

regards,
Thomas

Comment 7 Jeff Johnson 2003-12-28 06:58:56 UTC
Dunno if you still have a problem or not.

If you give me a ptr to a tar ball of /var/lib/rpm
    cd /var/lib
    tar czvf /tmp/rpmdb-103815.tar.gz rpm
I'll try to fix.

Comment 8 Jeremy Katz 2005-04-19 18:39:19 UTC
Closing due to inactivity.  If this issue still occurs with current releases,
please reopen and set the release in which you've encountered the problem.


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