Bug 40066 - rpm segfaults on installation attempts and database rebuild
Summary: rpm segfaults on installation attempts and database rebuild
Keywords:
Status: CLOSED DUPLICATE of bug 38454
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-10 11:54 UTC by Dave Goldblatt
Modified: 2007-04-18 16:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-05-10 11:54:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Dave Goldblatt 2001-05-10 11:54:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
When running 'up2date -u' a segfault resulted.  Traced it down to the 
installation of samba-2.0.8-0.7.1.i386.rpm.  Manually ran the rpm install 
and received same result.  Attempted to rebuild the RPM database, again 
segfaulted.

How reproducible:
Always

Steps to Reproduce:
1. rpm -i -v samba-2.0.8-0.7.1.i386.rpm, or
2. rpm -v --rebuilddb


Actual Results:  stack trace from 'rpm -i' appears useless.

Trace from 'rpm -v --rebuilddb':

(gdb) where
#0  0x40060cf3 in dataLength () from /usr/lib/librpm.so.0
#1  0x40060dcd in regionSwab () from /usr/lib/librpm.so.0
#2  0x4006174d in headerLoad () from /usr/lib/librpm.so.0
#3  0x400618da in headerCopyLoad () from /usr/lib/librpm.so.0
#4  0x4007255f in XrpmdbNextIterator () from /usr/lib/librpm.so.0
#5  0x40074bcc in rpmdbRebuild () from /usr/lib/librpm.so.0
#6  0x08049e4f in poptResetContext ()
#7  0x40174177 in __libc_start_main (main=0x8049830 
<poptResetContext+1572>, 
    argc=3, ubp_av=0xbffffc8c, init=0x8048ee4 <_init>, fini=0x8049f5c 
<_fini>, 
    rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbffffc7c)
    at ../sysdeps/generic/libc-start.c:129
(gdb) 

Expected Results:  Install the file(s), and be able to rebuild the 
database.

Additional info:

/var/lib/rpm contents available at
ftp://www.psyton.com/pub/rh/rpmcrash.tgz

Comment 1 Jeff Johnson 2001-05-11 22:28:33 UTC
Your header instance #1267 is damaged.

The fix is gonna be the same as bugzilla #38454, so follow directions there.
The one difference is that you will need to edit the attached t38454.c program
to change the bad instance to 1267 (decimal).



*** This bug has been marked as a duplicate of 38454 ***

Comment 2 Dave Goldblatt 2001-05-12 01:59:17 UTC
Thanks - that did the trick!  What was the magic incantation to determine the 
bad record?

Comment 3 Jeff Johnson 2001-05-12 13:04:59 UTC
Basically
    mkdir -p /etc/rpm
    echo '%_dbi_config_Packages %{_dbi_config}:lockdbfd:debug' >>
/etc/rpm/macros
and fixing a debugging message or three.

Meanwhile, I've checked in a much better fix to skip damaged records.


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