rpm 2.5.* segfaulted while trying to upgrade various packages that apparently have shared files. A bit of debugging on 2.5.7 (from the rawhide srpm) showed that the segfault was happening on line 1324 of lib/install.c, which reads as follows (in case that number isn't right): state = secFileStatesList[sharedList[i].secFileNumber]; Apparently secFileStatesList was NULL, which caused the segfault. Not knowing anything about the code, I wasn't sure why that was NULL, but on a whim I tried wrapping that little block (the line above plus the 7 lines after it) in #if 0. I don't know what that's likely to have broken, but it did let me install the packages. This happened while trying to upgrade to the 5.2 rpms from a (*ahem*) rather personalized 5.1 system (former Slackware 2.0 system hand-upgraded to rh 4.something on up to 5.2 now). My guess would be that there is some sort of inconsistency in the rpm database, but that's only a wild guess. I tried several versions of rpm. (I'm afraid I didn't keep track of exactly with ones, but I think I tried the versions from 5.1, 5.2, and the current rawhide.)
This bug has been assigned to a developer for further review. Please mail any patches or diffs as described in the bugzilla instruction pages.
Your guess that the segfault is caused by incorrect information retrieved from the database appears correct. Try "rpm --rebuilddb" after any/every rpm segfault. Please reopen this bug if the problem persists after doing "rpm --rebuilddb"