Bug 215180
Summary: | rpm segfaults on an attempt to rebuild database | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Jaegermann <michal> |
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6 | CC: | imc |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-07-17 12:44:25 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
Michal Jaegermann
2006-11-12 00:35:58 UTC
The segfault is likely the result of bad data, which is likely corrected by --rebuilddb. > The segfault is likely the result of bad data ...
These "bad data" were produced by nothing else but rpm and
an attempt to correct that resulted in a segfault. Luckily
the condition did not persist.
BTW - segfault in 'yum update' mentioned in the report is now bug 215184. Not much information there, I am afraid, beyond nasty result. It happened when all new packages were already installed and now yum was supposed to do all cleanups; so it left me with a pile of duplicates. rpm (and Berkeley DB) relies on shared posix mutexes for locking to insure data integrity. There's a rash of recent rpmdb problems, dunno the cause .... blame rpm which has not changed for over a year, certainly not the rpmdb code. YMMV. A --dupes option can be added to rpm with this line in /etc/popt: rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-% {version}}|}| \n' --pipe "sort | uniq -d" \ --POPTdesc=$"list duplicated packages" Invoke as rpm -qa --dupes. BTW, doing rm -f /var/lib/rpm/__db* before --rebuilddb --verbose would have eliminated a corrupt cache. In common with a few users, it seems, I'm finding rpm and yum very unstable under FC6. Just now: # rpm -ivh /home/imc/rpmbuild/RPMS/i386/xli-1.17.0-6.fc6.i386.rpm Preparing... Segmentation fault (core dumped) But where's my core file? # ls -l core ls: core: No such file or directory # ulimit -c unlimited > But where's my core file?
If you have 'ulimit -c' set to 'unlimited' then your core file will
really have a name like core.<process_id> so try 'ls -l core*'.
Also a process which dumped core may be a child with a different
context and a core is somewhere else (maybe /?). To look for all
possible core files try, with a current updatedb, the following
locate -r '/core\.[1-9]'
This may have a few wrong hits but not too many.
If you give me a ptr to a core using -ivv and the packages involved, I'll diagnose the segfault. Be forewarned: almost all segfaults in rpm are caused by bad data. Segafualts and loss of data are likely due to removing an rpmdb environment without correcting other problems in the rpmdb. FYI: Most rpmdb "hangs" are now definitely fixed by purging stale read locks when opening a database environment in rpm-4.4.8-0.4. There's more todo, but I'm quite sure that a large class of problems with symptoms of "hang" are now corrected. Detecting damaged by verifying when needed is well automated in rpm-4.4.8-0.4. Automatically correcting all possible damage is going to take more work, but a large class of problems is likely already fixed in rpm-4.4.8-0.8 as well. UPSTREAM *** This bug has been marked as a duplicate of 213963 *** |