Bug 89051 - unable to install packages via RPM; segmentation fault when querying rpm database
Summary: unable to install packages via RPM; segmentation fault when querying rpm data...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-16 22:02 UTC by Cor van 't Hoff
Modified: 2007-04-18 16:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-17 13:45:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Cor van 't Hoff 2003-04-16 22:02:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Description of problem:
when trying to install a package with rpm -ivh it just seems to wait for ever.
No hard disk activity or high load. I'm working on a 512 MB, 2.4 Ghz pentium.
I tried to follow the steps on
http://www.rpm.org/hintskinks/repairdb/

It looks like rpm -vv --rebuilddb goes allright, but after that I'm 
still not able to install everything. Also deleted the __db* files 
before rebuilding the db

[root@gemini rpm]# db_verify Packages
db_verify: region error detected; run recovery.
db_verify: Old or incorrect DB version; extraneous errors may result
db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification failed

[root@gemini rpm]# rpm -vv --rebuilddb
outputs a lot, more or less the same, here are the last rules
: adding 100 entries to Filemd5s index.
error: rpmdbNextIterator: skipping h#       1 Header V3 DSA signature: 
BAD, key ID db42a60e
D:  read h#    1385 Header V3 DSA signature: NOKEY, key ID 00000000
error: rpmdbNextIterator: skipping h#       1 Header V3 DSA signature: 
BAD, key ID db42a60e
D:   +++ h#     692 Header V3 DSA signature: NOKEY, key ID 00000000
D: adding "xpdf-japanese" to Name index.
D: adding 65 entries to Basenames index.
D: adding "Applications/Publishing" to Group index.
D: adding 4 entries to Requirename index.
D: adding 2 entries to Providename index.
D: adding 6 entries to Dirnames index.
D: adding 4 entries to Requireversion index.
D: adding 2 entries to Provideversion index.
D: adding 1 entries to Installtid index.
D: adding 1 entries to Sigmd5 index.
D: adding "2469adba66c7676b9ea5dc77ae0fd81a78d18397" to Sha1header index.
D: adding 65 entries to Filemd5s index.
Segmentation fault

Don't know if it is important to tell but, the first rpm that failed whas a rpm
I build for microsoft's TrueType corefonts http://corefonts.sourceforge.net/


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

How reproducible:
Always

Steps to Reproduce:
1. rpm -ivh program
2. or rpm -qa
3.
    

Actual Results:  RPM stops with a segmentation fault with rpm -qa or just hangs
when installing software

Expected Results:  List of results from the query of a complete installation of
a rpm

Additional info:

A copy of my rpm directory (cd /var/lib ; tar czvf /tmp/rpmdb.tar.gz rpm can be
downloaded from 
http://jheronimus.homelinux.com/rpmdb.tar.gz
As this tar is 24MB in size I was not able to put it on a homepage of my ISP,
but it's at my little server at home with a limited uplink (128kb) so it will
take some time to download.

Comment 1 Jeff Johnson 2003-04-17 13:31:54 UTC
Hmmm, your Pubkeys index appears strange.

Doing
    cd /var/lib/rpm
    rm -f __db* Pubkeys
got most rpm functionality back.

Looking at gpg-pubkey problem now ...

Comment 2 Jeff Johnson 2003-04-17 13:45:30 UTC
Doing --rebuilddb (after removing Pubkeys as above) appears
to have fixed problems. You might try that, but, just
in case, there's a copy of your rpm/Packages at
    ftp://people.redhat.com/jbj/rpmdb-89051-FIX.tar.gz
Download and install (if necessary) by doing
    cd /var/lib
    mv rpm rpm-SAVE
    tar xzvf rpmdb-89051-FIX.tar.gz
    rpm --rebuilddb -vv
Verify fix by doing
    rpm -qavv

Comment 3 Cor van 't Hoff 2003-04-17 21:36:34 UTC
Tried your suggestions and everything works fine now. Installed several packages
after the fix and no problems at all, wonderfull!!


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