Bug 40066 - rpm segfaults on installation attempts and database rebuild
rpm segfaults on installation attempts and database rebuild
Status: CLOSED DUPLICATE of bug 38454
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-10 07:54 EDT by Dave Goldblatt
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-10 07:54:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Goldblatt 2001-05-10 07:54:52 EDT
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 18:28:33 EDT
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-11 21:59:17 EDT
Thanks - that did the trick!  What was the magic incantation to determine the 
bad record?
Comment 3 Jeff Johnson 2001-05-12 09:04:59 EDT
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.