Bug 215198

Summary: rpm -q yum exits with segmentaion fault
Product: [Fedora] Fedora Reporter: cornel panceac <cpanceac>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-17 12:19:41 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:
Attachments:
Description Flags
yum --enablerepo={livna,freshrpms} update output none

Description cornel panceac 2006-11-12 09:55:25 UTC
Description of problem:
rpm -q yum exits with segmentaion fault

Version-Release number of selected component (if applicable):
rpm-4.4.2-32

How reproducible:
every time

Steps to Reproduce:
1.rpm -q yum
2.
3.
  
Actual results:
segmentation fault

Expected results:
displays the yum version

Additional info:
it seems to affect only root account. it worked from regular user account.

after this,
yum check-update
and rpm -q yum freezes indefinitely. i'll check again after reboot (probably
tomorrow)

(
removing lock files and killing process was of no help
)

Comment 1 Jeff Johnson 2006-11-12 15:10:04 UTC
Presumably you killed the process and *then* did "rm -f /var/lib/rpm/__db*".

Usually "hangs" are caused by stale locks. All locks can be displayed by doing
    cd /var/lib/rpm
    sudo /usr/lib/rpm/rpmdb_stat -Cl
when rpm/yum "hangs".

If the segfaults persists, then you may have a damaged header. Try
    cd /var/lib/rpm
    sudo /usr/lib/rpm/rpmdb_verify Packages
to check for damaged headers.

Comment 2 cornel panceac 2006-11-13 19:52:17 UTC
#cd /var/lib/rpm
#/usr/lib/rpm/rpmdb_verify Packages

produces no output
(unlike rpm -Va, wich is full of 

 at least one of file's dependencies has changed since prelinking

and other errors)
and i had no locks since ....

Comment 3 Jeff Johnson 2006-11-14 22:15:49 UTC
Verifying the installed packages with -Va is very different than using rpmdb_verify to check
rpmdb integrity.

Running prelink should get rid of the warning messages from prelink.

Othere errors might be due to data loss, might be "known changing" files.
Without specific details, its impossible to say.

Comment 4 cornel panceac 2006-11-28 11:58:20 UTC
on another system (fc6t3>fc6)

# yum install policycoreutils openssl pango
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Segmentation fault

and then

# yum install policycoreutils openssl pango
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments

hangs.

then: 
displaying the locks:

# /usr/lib/rpm/rpmdb_stat -Cl
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lock REGINFO information:
Lock    Region type
3       Region ID
__db.003        Region name
0xb7dbc000      Original region address
0xb7dbc000      Region address
0xb7e29f40      Region primary address
0       Region maximum allocation
0       Region allocated
REGION_JOIN_OK  Region flags
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Locks grouped by lockers:
Locker   Mode      Count Status  ----------------- Object ---------------
      1a dd= 0 locks held 1    write locks 0      
      1a READ          1 HELD    (516baa 807 f3c9e222 1895d 0) handle        0
      1b dd= 0 locks held 1    write locks 0      
      1b READ          2 HELD    0x35328 len:  20 data:
0xaakQ000x070x080000"0xe20xc90xf3]0x890x010000000000
      1f dd= 0 locks held 1    write locks 0      
      1f READ          1 HELD    (516baa 807 f3c9e222 1895d 0) handle        0
      20 dd= 0 locks held 1    write locks 0      
      20 READ          2 HELD    0x35328 len:  20 data:
0xaakQ000x070x080000"0xe20xc90xf3]0x890x010000000000

# /usr/lib/rpm/rpmdb_verify Packages

hangs too.

Comment 5 Jeff Johnson 2006-12-03 18:28:08 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 6 cornel panceac 2006-12-03 21:06:28 UTC
then i'll try to use rpm-4.4.8-0.8 or above
thank you very much

Comment 7 Jeff Johnson 2006-12-03 23:02:46 UTC
See bugzill #214110 for (brief) description. btw, I meant -0.4, not -0.8.


Comment 8 cornel panceac 2006-12-04 19:22:37 UTC
ok, thank you very much.

Comment 9 cornel panceac 2006-12-12 18:25:47 UTC
Created attachment 143421 [details]
yum --enablerepo={livna,freshrpms} update output

Comment 10 cornel panceac 2006-12-12 18:52:25 UTC
hopefuly fixed with:

# rm -f /var/lib/rpm/__db*
# /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages
# rpm --rebuilddb

as suggested above.

Comment 11 Panu Matilainen 2007-07-17 12:19:41 UTC

*** This bug has been marked as a duplicate of 213963 ***