Bug 53188
Summary: | rpm crashes with seg fault doing database operations | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Stan Bubrouski <stan> |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://66.31.233.44:81/rpm/rpmdb.tar.bz2 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-09-05 20:51:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stan Bubrouski
2001-09-04 23:19:27 UTC
Hmmm, your database is majorly borked, I'm not going to be able to do anything with it. I've looked at the segfault, and hardcoded skips across bad records. The next 15 or so records after the segfault are all bad, and I have no reason to think that continuing to skip bad records is going to lead to joy. Yes, rpm will continue to segfault, as it relies on intact headers being retrieved. Meanwhile, look at /var/log/rpmpkgs. There should be a list of the package that you had installed. If you can find all the packages (or close equivalents) you can recreate the rpmdb by doing cd /var/lib mv rpm rpm-SAVE mkdir rpm rpm --initdb and then installing each package with the flags -Uv --justdb --notriggers --noscripts --nodeps I'd also be interested in how your database was damaged. All I can think of is that you ran out of space while doing a large upgrade, causing many evil things to happen. Disk space was never an issue. I don't know how it happened. I can try to investigate but chances are I'm not going to find anything. Looking at /var/log/rpmpkgs it's only has the same amount (260) as my damaged database shows me with rpm -qa, so now my guess would be the corruption occurred after installing one of the rawhide rpm packages. I do an automatic backup every week so I have an older database to compare to the new one. The problem started (as far as I know on August 22nd and I have a backup from August 20th.) The only downside is that I updated a few hundred packages between August 20th and 22nd, but on the good side, a lot of the packages listed in /var/log/rpmpkgs are the ones I updated between those dates). If you'd like to compare the older one to the corrupt one I can post it on my webserver if you think it would assist you in any way. It's not a problem. Unfortunately the database from the 20th is corrupt as well...and it is the only backup I had left. Oh well. Hmmm, from the guy who smashes rpm databases for a living :-) You might wnat to rename /var/lib/rpm, and do an install. If you carefully avoid doing mkfs on your existing file systems, then most all the packages you wish to reinstall will be reinstall'ed by anaconda, the Red Hat installed, and most of your existing customizations will be saved as .rpmorig files. After getting through the install, look for unowned files in all the usual (i.e. /bin /usr/bin /usr/sbin /usr/lib ...) directories, looking for orphaned files with rpm -qf /some/file/path For each orphaned file, then do rpm -q --redhatprovides /some/file/path to find which package contains the file. You need the rpmdb-redhat package installed for this to work. I'm gonna close this bug, but feel free to ask on rpm-list or reopen this bug if you need help. |