Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 81450

Summary: rpmdb dumps core, bt included
Product: [Retired] Red Hat Linux Reporter: Toni Willberg <toniw>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-10 19:36:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Toni Willberg 2003-01-09 17:02:40 UTC
Description of problem:
 rpm --rebuilddb -vv dumps always core on one box.

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

How reproducible:

Steps to Reproduce:
 rpm --rebuilddb -vv

Actual Results:  
 Segmentation fault (core dumped)

Backtrace from gdb:

#0  0x400622be in providePackageNVR () from /usr/lib/
#1  0x4007f844 in doGetRecord () from /usr/lib/
#2  0x4007fb37 in db1cget () from /usr/lib/
#3  0x40068663 in dbiGet () from /usr/lib/
#4  0x4006aa59 in XrpmdbNextIterator () from /usr/lib/
#5  0x4006d52d in rpmdbRebuild () from /usr/lib/
#6  0x804a2f0 in poptResetContext ()
#7  0x4016b9cb in __libc_start_main (main=0x8049c84 <poptResetContext+2712>,
argc=4, argv=0xbffffb44, init=0x8048ecc <_init>,
    fini=0x804a3bc <_fini>, rtld_fini=0x4000ae60 <_dl_fini>,
stack_end=0xbffffb3c) at ../sysdeps/generic/libc-start.c:92

Comment 1 Toni Willberg 2003-01-10 08:14:16 UTC
Ok, after Googling around I found this solution:

Download following packages from:

  (and others if you need them)

Upgrade them: rpm -Uvh rpm-4.0.4-6x.21.i386.rpm popt-1.6.4-6x.21.i386.rpm
 (ps. I had to remove ucd-snmp and ucd-snmp-utils as they depend on rpm-4.0.2!)

After upgrading just run rpm --rebuilddb and everything works again.

I strongly suggest releasing rpm-4.0.4 officially as this bug seems to bother
many people and it's not trivial to find a way to fix it.

Comment 2 Toni Willberg 2003-01-10 08:18:36 UTC
Additionally, you can downgrade back to rpm-4.0.2 after you've rebuilded your
rpm db with rpm-4.0.4. This might be required if you use fe. apt or something
else that requires rpm-4.0.2.

Comment 3 Jeff Johnson 2003-01-10 19:36:12 UTC
Downgrading to rpm-4.0.2 is silly, recompile
whatever packages have dependencies is better

Make sure you do --rebuilddb to convert from db1 ->db3,
traceback shows that you have not done this.

Comment 4 Toni Willberg 2003-01-11 13:00:07 UTC

What part of downgrading to _official_ version of RPM you find silly? :o

I don't compile any packages myself if I just can avoid it. And I will avoid it
as there's no reason to do it. That's RedHat's task. :)

Secondly, what do you mean by converting db1 -> db3? Do you mean that upgrading
from RPM 3.x to 4.0.2 does not do it automatically? If not, there's a bug in RPM
4.0.2 spec obviously.

And last, why did you mark this as "WORKSFORME" as there's clearly a bug? Even
if there's a solution to go around this bug, it does not mean the bug is gone away.