Bug 216643

Summary: Segmentation fault while doing rpm -qa
Product: Red Hat Enterprise Linux 5 Reporter: Dirk Gfroerer <dirk.gfroerer>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: herrold
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 2.6.18-1.2961.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-20 11:09:50 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 Dirk Gfroerer 2006-11-21 10:34:33 UTC
Description of problem:

rpm-4.4.2-33.el5

How reproducible:
Sometimes. Happened now for the second time in three days.

Steps to Reproduce:
1. rpm -qa

Actual results:
rpm hangs. Error message in syslog:
kernel: rpmq[4141]: segfault at 0000000000000078 rip 00000036d46d290b rsp
00007fff662ff2a0 error 4

Expected results:
rpm query completes successful

Additional info:
Have to move away the __db* files in /var/lib/rpm. Otherwise all new rpm -qa
invocations just hangs.

Comment 1 Jeff Johnson 2006-12-03 18:36:37 UTC
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

Comment 2 Panu Matilainen 2007-08-20 11:09:50 UTC
The random breakage is almost certainly caused by kernel 2.6.18-19 mmap() bug
which was present in some RHEL 5 beta kernels. RHEL 5 GA and later are not
affected.