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 156025

Summary: rpm crashing
Product: Red Hat Enterprise Linux 4 Reporter: James Willcox <james>
Component: rpmAssignee: Paul Nasrat <pnasrat>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: maw
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-27 19:17:32 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 James Willcox 2005-04-26 18:27:33 UTC
It appears that rpm is giving out corrupted/broken headers from queries, causing
later operations on said headers to crash.  I have the following backtrace:

#0  0x0000002a95970a42 in indexCmp (avp=0x7fbfffefd0, bvp=0x480) at header.c:263
#1  0x000000359182fe6c in bsearch () from /lib64/tls/
#2  0x0000002a95971535 in findEntry (h=0x2023010, tag=1003, type=0) at header.c:916
#3  0x0000002a959721d6 in intGetEntry (h=0x2023010, tag=1152, type=0x7fbffff0ac,
    c=0x7fbffff0a8, minMem=0) at header.c:1684

The header was obtained with:

mi = rpmtsInitIterator (rpmts, RPMDBI_LABEL, "blah", 0);
while ((header = rpmman->rpmdbNextIterator (mi))) {
    /* do stuff with header */

It's difficult to reproduce this, and I have not seen this behavior in the rpm
command line tool.  I'm still looking into it, however, and expect to have more
information soon.

Comment 1 Paul Nasrat 2005-04-26 21:06:33 UTC
Any chance of the code/pointers to packages involved - for quicker debugging
#rpm on freenode may help.

Comment 2 James Willcox 2005-04-27 19:17:32 UTC
Oops, this was a memory management bug in our stuff, not a bug in rpm.  Closing
as such.