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 - rpm crashing
Summary: rpm crashing
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: rpm
Version: 4.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-04-26 18:27 UTC by James Willcox
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-04-27 19:17:32 UTC
Target Upstream Version:

Attachments (Terms of Use)

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.

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