Bug 108915 - 'rpm -qa' results in: error: rpmdbNextIterator.....
Summary: 'rpm -qa' results in: error: rpmdbNextIterator.....
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-03 05:18 UTC by Brian Jackowski
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description Brian Jackowski 2003-11-03 05:18:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016

Description of problem:
Recently, when trying to install rpms, installation would fail; even
querying the RPM database would segfault.

[root@localhost root]# rpm -qa
error: rpmdbNextIterator: skipping h#     710 Header V3 DSA signature:
BAD, key
ID db42a60e
Segmentation fault
[root@localhost root]#

From what I understand, the RPM database is essentially a linked list;
somehow one or more entries in are not pointing to the next entry like
it should; that much I know.  How to fix it, is beyond me at this point.

In my search for an answer, I stumbled upon:
http://www.rpm.org/hintskinks/repairdb/; and followed the directions
listed there to the tee.  Unfortunatly I'm still no farther ahead. 
The following are steps I've taken

cd /var/lib/rpm
db_verify Packages     (No errors at this point)

/usr/lib/rpm/rpmdb_verify Packages   (Still no errors at this point)

With no immediate errors, I proceed to execute...

rpm --rebuilddb

At which point I get the same exact error that I've been getting when
trying to query the package list.

[root@localhost root]# rpm --rebuilddb
error: rpmdbNextIterator: skipping h#     710 Header V3 DSA signature:
BAD, key
ID db42a60e
Segmentation fault
[root@localhost root]#

At this point I'm at a complete loss of where to go next.

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

How reproducible:
Always

Steps to Reproduce:
1.  rpm -qa, or installation of any rpm packages using rpm -Uvh
package-xxx.rpm    

Additional info:

Maybe this isn't a rpm corruption issue at all.  I am able to list
packages from the Packages database with 'rpm -qa --nosignature'.  Not
sure what's going on.  Maybe somehow I've lost the gpg-key some
package required?  Even so, I've got to find a way to remove the
offending entry so I can get rpm working again and get on with my life!

Comment 1 Jeff Johnson 2003-12-05 16:19:22 UTC
Try removing (or renaming) /var/lib/rpm/Pubkeys and doing
rpm --rebuilddb -vv to recreate the index.

Does that fix?

Comment 2 Francois Massonneau 2003-12-27 00:04:02 UTC
Sorry to jump on this one, but I've got the same kind of errors :
error: rpmdbNextIterator: skipping h#     423 blob size(3368): BAD, 8
+ 16 * 
il(17) + dl(3056)
error: rpmdbNextIterator: skipping h#     956 Header V3 DSA signature:
BAD, 
key ID db42a60e
Erreur de segmentation
[root@celtes2 archives]#

I've tried rpmdb --rebuilddb or rpm --rebuilddb. No success.
I've tried :
  rm -f __db.00[123]
  rpm --rebuilddb
No success.
But I did what you said above and it has worked. The database seems to
be good now.
Francois

Comment 3 Leonard den Ottolander 2004-04-13 14:28:43 UTC
Brian, does the workaround work for you?

Comment 4 Jeremy Katz 2005-04-19 19:00:34 UTC
Closing due to inactivity.  Please reopen if this still occurs on newer releases
with the details about how the workaround fails.


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