Bug 71337

Summary: rpm -qa segfaults on fixed Packages
Product: [Retired] Red Hat Linux Reporter: Alexis Le-Quoc <g33k>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.le-quoc.com/pack.gz
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-08-12 19:43:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Packages from /var/lib/rpm none

Description Alexis Le-Quoc 2002-08-12 13:59:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Description of problem:
rpm -qa segfaults after displaying a few entries.

The Packages file got corrupted after installing perl v5.6.1 (it would not pass 
db_verify), and rpm -qa would crash. I used db_dump Packages-ORIG | db_load 
Packages in /var/lib/rpm. With the new Packages file, db_verify does not 
complain anymore, but rpm still segfaults. rpm --rebuilddb exhibits the same 
behavior.

Among the displayed entries, one can see perl 5.6.0 which has been replaced 
with perl 561 on the system. The rpm db is out of sync.

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


How reproducible:
Always

Steps to Reproduce:
1. Move Packages to /var/lib/rpm
2. run rpm -qa
	

Actual Results:  Segfault without any trace

Expected Results:  rpm -qa should have displayed the installed packages.

Additional info:

this is stock rpm v4.0.3.

Comment 1 Alexis Le-Quoc 2002-08-12 14:01:11 UTC
Created attachment 70024 [details]
Packages from /var/lib/rpm

Comment 2 Jeff Johnson 2002-08-12 16:51:52 UTC
Can you give me a URL to the tar ball? rpm databases are too
bug for bugzilla attachments.

Comment 3 Alexis Le-Quoc 2002-08-12 19:42:59 UTC
http://www.le-quoc.com/pack.gz

Comment 4 Jeff Johnson 2002-08-13 18:03:02 UTC
Instance #32 was bad, deleted.

There's a copy of your repaired Packages at
    ftp://people.redhat.com/jbj/rpmdb-71337-FIX.tar.gz
Download, and install by doing (as root)
    cd /var/lib
    mv rpm/Packages rpm/Packages-ORIG
    tar xzvf rpmdb-71337-FIX.tar.gz
    rpm --rebuilddb -vv
Verify the fix by doing rpm -qa.