Bug 111230 - Segfault when using RPM commands
Segfault when using RPM commands
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
4.2
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-30 22:18 EST by Ed Lally
Modified: 2007-04-18 12:59 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-05 14:01:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output log from rpm --rebuilddb (19.77 KB, text/plain)
2003-12-01 21:36 EST, Ed Lally
no flags Details

  None (edit)
Description Ed Lally 2003-11-30 22:18:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
Running any RPM commands -- query, rebuilddb, erase, etc. -- results 
in a Segmentation Fault like this:

error: rpmdbNextIterator: skipping h#     952 Header V3 DSA 
signature: BAD, key
ID db42a60e
Segmentation fault

I have tried deleting the RPM lock files, rebuilding the database, 
and even using doing a dump/load to recreate the Packages file (as 
documented at http://www.rpm.org/hintskinks/repairdb/

It appears there's a conflict between version of RPM and db4-utils 
installed, as running "/usr/bin/db_verify Packages" reports the 
following:

db_verify: Old or incorrect DB version; extraneous errors may result
db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification 
failed

although executing "/usr/lib/rpm/rpmdb_verify Packages" runs 
successfully.

This is occurring on a system which had RH9 installed in June 2003 
with all updates applied.

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

How reproducible:
Always

Steps to Reproduce:
1. run any rpm command, e.g. rpm -qi db4-utils
2.
3.
    

Actual Results:  error: rpmdbNextIterator: skipping h#     952 Header 
V3 DSA signature: BAD, key
ID db42a60e
Segmentation fault

Additional info:
Comment 1 Jeff Johnson 2003-12-01 09:37:51 EST
Use /usr/lib/rpm/rpmdb_verify instead, you appear to
have db4-utils-4.0.14 installed.

Also try deleting the public key before --rebuilddb. Command
should be like (watch for typos):
    rpm -e gpg-pubkey-db42a60e

Does that "fix"?
Comment 2 Ed Lally 2003-12-01 21:36:19 EST
Created attachment 96277 [details]
Output log from rpm --rebuilddb
Comment 3 Ed Lally 2003-12-01 21:37:08 EST
I was able to remove db4-utils with 'rpm -e' today, although 
using 'rpm -e' was failing with a segmentation fault yesterday.  So, 
db4-utils is now gone.

I removed the pubkey per the instructions and tried --rebuilddb which 
failed with the same segmentation fault.  I also found other gpg-
pubkey packages and removed them.  

rpmdb_verify shows the Packages file is OK, but I recreated it with 
rpmdb_dump and rpmdb_load just in case.  The segfault still appears.

Please see attachment for output from 'rpmdb --rebbuilddb'

Comment 4 Jeff Johnson 2003-12-05 09:10:26 EST

*** This bug has been marked as a duplicate of 111541 ***
Comment 5 Jeff Johnson 2003-12-05 09:13:05 EST
Hmmm I don't believe the pubkey is removed.

What does rpm -q gpg-pubkey say?
Comment 6 Ed Lally 2003-12-05 10:32:03 EST
"rpm -q gpg-pubkey" reports:

error: rpmdbNextIterator: skipping h#     953 Header V3 DSA 
signature: BAD, key ID 66534c2b
perl-XMLTV-0.5.23-38.rh9.at
Segmentation fault

============================================================
I saw that this was marked as a duplicate of bug 111541.  I am using 
the updated version of rpmdb_verify to check the database -- and it 
reports the database is valid -- but the other rpm commands 
themselves still don't seem to read the database correctly.  Is there 
something else I need to do to fix the database?
Comment 7 Jeff Johnson 2003-12-05 11:04:45 EST
Rename the /var/lib/rpm/Pubkeys to do --nosignature
the hard way.

Then try "rpm -q gpg-pubkey" and or "rpm -qa | grep gpg-pubkey"
to verify if the key is still installed.
Comment 8 Ed Lally 2003-12-05 14:01:31 EST
Those last steps, with an "rpm --rebuilddb" in-between, have resolved 
the problem.

Thanks for all the help!

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