Bug 131469 - rpm -e segfaults
rpm -e segfaults
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-01 12:47 EDT by Chris Ricker
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-02 13:09:04 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)
strace of rpm segfault (20.71 KB, application/octet-stream)
2004-09-01 12:48 EDT, Chris Ricker
no flags Details

  None (edit)
Description Chris Ricker 2004-09-01 12:47:19 EDT
[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 12:48:53 EDT
Created attachment 103345 [details]
strace of rpm segfault
Comment 2 Jeff Johnson 2004-09-02 11:38:26 EDT
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 11:40:32 EDT
And perhaps try cache removal before --rebuilddb
    rm -f /var/lib/rpn/__db*
Comment 4 Chris Ricker 2004-09-02 12:08:57 EDT
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 12:18:34 EDT
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 12:29:09 EDT
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 13:09:04 EDT
np

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