Bug 131469 - rpm -e segfaults
Summary: rpm -e segfaults
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: 1
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-01 16:47 UTC by Chris Ricker
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-02 17:09:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace of rpm segfault (20.71 KB, application/octet-stream)
2004-09-01 16:48 UTC, Chris Ricker
no flags Details

Description Chris Ricker 2004-09-01 16:47:19 UTC
[root@mailserver rpm]# rm -f /var/lib/rpm/__db.00?
[root@mailserver rpm]# /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages 
[root@mailserver rpm]# rpm -q kernel
kernel-2.4.22-1.2199.nptl
kernel-2.4.22-1.2188.nptl
kernel-2.4.22-1.2115.nptl
kernel-2.4.22-1.2179.nptl
[root@mailserver rpm]# rpm -e kernel-2.4.22-1.2188.nptl
Segmentation fault
[root@mailserver rpm]# 

This is a stock current-on-patches FC1 box

Comment 1 Chris Ricker 2004-09-01 16:48:53 UTC
Created attachment 103345 [details]
strace of rpm segfault

Comment 2 Jeff Johnson 2004-09-02 15:38:26 UTC
Strace hints at data problem with retrieved header.

Does
    rpm -qa --qf '[%{*:xml}\n]'
segfault? that command reads every byte of every header.

Try --rebuilddb if segfault.

You might also import pubkeys to strengthen the header
blob integrity checks (if you haven't already).

Comment 3 Jeff Johnson 2004-09-02 15:40:32 UTC
And perhaps try cache removal before --rebuilddb
    rm -f /var/lib/rpn/__db*

Comment 4 Chris Ricker 2004-09-02 16:08:57 UTC
The rpm -qa --qf didn't segfault, but it did produce this error:


[root@mailserver rpm]# rpm -qa --qf '[%{*:xml}\n]' > /tmp/rpm-headers
error: rpmdbNextIterator: skipping h#     395 Header V3 DSA signature:
BAD, key ID 4f2a6fd2
[root@mailserver rpm]# 



Comment 5 Jeff Johnson 2004-09-02 16:18:34 UTC
OK, that is damaged data blob.

rpm --rebuilddb will discard any header that do not verify.

/var/log/rpmpkgs.log comparison ill teel you what header was dropped,
see also rpm -qa --last output.

Comment 6 Chris Ricker 2004-09-02 16:29:09 UTC
Looks like that fixed it

[root@mailserver tmp]# cd /var/lib/rpm
[root@mailserver rpm]# rm -f __db.00?
[root@mailserver rpm]# rpm --rebuilddb
error: rpmdbNextIterator: skipping h#     395 Header V3 DSA signature:
BAD, key ID 4f2a6fd2
[root@mailserver rpm]# rpm -e kernel-2.4.22-1.2188.nptl
[root@mailserver rpm]# rpm -e kernel-2.4.22-1.2179.nptl

thanks!

Comment 7 Jeff Johnson 2004-09-02 17:09:04 UTC
np


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