Bug 215198 - rpm -q yum exits with segmentaion fault
rpm -q yum exits with segmentaion fault
Status: CLOSED DUPLICATE of bug 213963
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
6
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-12 04:55 EST by cornel panceac
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-17 08:19:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
yum --enablerepo={livna,freshrpms} update output (10.13 KB, text/plain)
2006-12-12 13:25 EST, cornel panceac
no flags Details

  None (edit)
Description cornel panceac 2006-11-12 04:55:25 EST
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 10:10:04 EST
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 14:52:17 EST
#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 17:15:49 EST
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 06:58:20 EST
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 13:28:08 EST
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 16:06:28 EST
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 18:02:46 EST
See bugzill #214110 for (brief) description. btw, I meant -0.4, not -0.8.
Comment 8 cornel panceac 2006-12-04 14:22:37 EST
ok, thank you very much.
Comment 9 cornel panceac 2006-12-12 13:25:47 EST
Created attachment 143421 [details]
yum --enablerepo={livna,freshrpms} update output
Comment 10 cornel panceac 2006-12-12 13:52:25 EST
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 08:19:41 EDT

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

Note You need to log in before you can comment on or make changes to this bug.