Bug 50726

Summary: Segmentation fault with "rpm --rebuilddb"
Product: [Retired] Red Hat Linux Reporter: Need Real Name <william.swisher>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-08-08 16:58:57 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:

Description Need Real Name 2001-08-02 16:58:15 UTC
Description of Problem:

rpm 4.0.2
Running "rpm --rebuilddb" produces the following errors.
error:  record number 439 in database is bad -- skipping.
Segmentations fault (core dumped)

How Reproducible:
Yep...just type in the command.

Steps to Reproduce:
1. rpm --rebuilddb
2. 
3. 

Actual Results:
See above

Expected Results:
Actually, if I recall right, there is no indication of anything.

Additional Information:
I should be up to the most current "fixes" on all installed packages.  I'm 
really careful about this.

Comment 1 Jeff Johnson 2001-08-02 17:08:59 UTC
Hmmm, IIRC that's an rpm-4.0.3 message, not a rpm-4.0.2 message.
What does "rpm --version" and/or "rpm -q rpm" have to say?

Meanwhile, manys segfaults due to bad headers in the database are
fixed in rpm-4.0.3 from Raw Hide or at ftp://ftp.rpm.org/pub/rpm/test-4.0.3.
Can you try installing rpm-4.0.3 and then doing "rpm --rebuilddb"?

If that still segfaults please reopen this bug with a pointer (i.e. URL,
not a bugzilla attachment) to a tarball of your database
	cd /var/lib
	tar czvf /tmp/rpmdb3-50726.tar.gz rpm

Comment 2 Need Real Name 2001-08-07 22:54:26 UTC
rpm --version says:
RPM version 4.0.2

rpm -q rpm says:
rpm-4.0.2-8
-----------
Got a copy of rpm-4.0.3.57.i386.rpm
At this point I get caught in those wonderful dependencies....
rpm -Uvh rpm-4.0.3.57.i386.rpm says:
	xxxxxxx is needed by rpm-python-4.0.2-8
rpm -e rpm-python-4.0.2-8 says:
	xxxxxxx is needed by up2date-2.5.4-1
	xxxxxxx is needed by rhn_register-1.3.2-1
rpm -e up2date-2.5.4-1 says:
	Segmentation fault (core dumped)

And, I still can't get rpm --rebuilddb to run.
So, I did:
rpm -Uvh --nodeps rpm-4.0.3.57.i386.rpm which said:
Preparing...	Segmentation fault (core dumped)
--------------
+If that still segfaults please reopen this bug with a pointer (i.e. URL,
+not a bugzilla attachment) to a tarball of your database

Not sure what you want here.  I can easily produce a gz file for you...I do not 
have a web site to place it tho.

Comment 3 Jeff Johnson 2001-08-07 23:48:29 UTC
Add --nodeps when upgrading the rpm package.

Comment 4 Need Real Name 2001-08-08 15:16:51 UTC
You said:
Add --nodeps when upgrading the rpm package.

To which I had already said (about 8 lines above yours):
rpm -Uvh --nodeps rpm-4.0.3.57.i386.rpm which said:
Preparing...	Segmentation fault (core dumped)


Comment 5 Jeff Johnson 2001-08-08 16:58:52 UTC
Apologies for misreading. See instructions for installing 
using rpm2cpio at bugzilla #51152.

Comment 6 Jeff Johnson 2001-08-08 18:46:20 UTC
This problem appears fixed (via private e-mail).