Bug 111230 - Segfault when using RPM commands
Summary: Segfault when using RPM commands
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
(Show other bugs)
Version: 4.2
Hardware: athlon Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-01 03:18 UTC by Ed Lally
Modified: 2007-04-18 16:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-05 19:01:31 UTC
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-02 02:36 UTC, Ed Lally
no flags Details

Description Ed Lally 2003-12-01 03:18:29 UTC
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 14:37:51 UTC
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-02 02:36:19 UTC
Created attachment 96277 [details]
Output log from rpm --rebuilddb

Comment 3 Ed Lally 2003-12-02 02:37:08 UTC
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 14:10:26 UTC

*** This bug has been marked as a duplicate of 111541 ***

Comment 5 Jeff Johnson 2003-12-05 14:13:05 UTC
Hmmm I don't believe the pubkey is removed.

What does rpm -q gpg-pubkey say?

Comment 6 Ed Lally 2003-12-05 15:32:03 UTC
"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 16:04:45 UTC
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 19:01:31 UTC
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.