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
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 ***
Thanks - that did the trick! What was the magic incantation to determine the bad record?
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.