Bug 103815 - rpm --rebuilddb results in segmentation fault
rpm --rebuilddb results in segmentation fault
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.3
i386 Linux
high Severity high
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-05 06:59 EDT by Thomas Emde
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 14:39:19 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)

  None (edit)
Description Thomas Emde 2003-09-05 06:59:13 EDT
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 09:35:39 EDT
Does not hep *how*? What failure are you seeing?
Comment 2 Thomas Emde 2003-09-08 01:25:13 EDT
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 00:56:33 EDT
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 10:45:42 EDT
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 00:17:13 EDT
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 05:29:05 EST
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 01:58:56 EST
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 14:39:19 EDT
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.