Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 157269 - rpm hangs / freezes -- rpmk displayed in ps
rpm hangs / freezes -- rpmk displayed in ps
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-05-09 19:56 EDT by Aaron C. de Bruyn
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-26 22:44:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of: strace -fF -o /tmp/rpm.strace rpm --import somekey (46.85 KB, text/plain)
2005-05-11 23:52 EDT, Aaron C. de Bruyn
no flags Details

  None (edit)
Description Aaron C. de Bruyn 2005-05-09 19:56:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
About once per month RPM decides to lock up on my system.
This time I was trying to import a new pgp key into rpm from a file.
#rpm --import somekey

It just sat there.

# ps
  PID TTY          TIME CMD
 1527 pts/1    00:00:00 su
 1542 pts/1    00:00:00 bash
 3033 pts/1    00:00:00 rpmk
 3034 pts/1    00:00:00 ps

I have tried telinit 1--made sure no rpm processes were running, and it still hangs.

After it hangs the first time, *ANY* rpm operation causes it to hang.

The only thing that fixes this is a reboot.

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

How reproducible:

Steps to Reproduce:
1. rpm --import somekey

1. rpm --install anyrpm.rpm

1. telinit 1
2. kill off nonessential processes
3. rpm --anycommand

Actual Results:  RPM hangs.
I have let it run for up to 30 minutes.

Additional info:

Linux elorg.local #1 SMP Wed Apr 13 12:14:46 PDT 2005 i686 i686 i386 GNU/Linux

If anyone can tell my what kind of additional information they'd like, I'd be happy to get it.
Comment 1 Aaron C. de Bruyn 2005-05-09 20:57:27 EDT
After more fooling around, I can now get RPM to crash nearly any time I try to
import a key.

If you want to have a look at the public key, it on pgpkeys.mit.edu.  The KeyID
is 30c9ecf8 (Fedora Project - rawhide@redhat.com)

I import that into gpg using
gpg --keyserver pgpkeys.mit.edu --recv-keys 30c9ecf8
Then export it to a file using
gpg --armor --export 30c9ecf8 > somekey
Then I run
rpm --import somekey

I can almost always get it to hang.  If it doesn't hang, I have noticed the key
doesn't get imported.  If I try to import it again, it will hang.  The only way
to kill it is switch to another console and kill the process.  CTRL+C and CTRL+Z
do not give up control.

$ gpg --version
gpg (GnuPG) 1.2.6

$ rpm --version
RPM version 4.3.2
Comment 2 Paul Nasrat 2005-05-11 11:43:40 EDT
Could you attach the output of

strace -fF -o /tmp/rpm.strace rpm --import somekey

Comment 3 Aaron C. de Bruyn 2005-05-11 23:52:26 EDT
Created attachment 114279 [details]
Output of: strace -fF -o /tmp/rpm.strace rpm --import somekey

Ran 'strace -fF -o /tmp/rpm.strace rpm --import somekey' about 8 times.  It
completed without errors every time.
Ran 'rpm -qa gpg-pubkey*'
The key was not imported.
Comment 4 Aaron C. de Bruyn 2005-05-11 23:56:43 EDT
After running the "strace ..." from my previous comment, I tried 'rpm --import
somekey' and it hung (hanged?  My english teacher from high school would be so
disappointed...) again.

Rebooted and tried "strace ..." again, no problems.
Comment 5 Jeff Johnson 2005-08-26 22:44:59 EDT
rpm is hanging because you are leaving a stale lock by killing the running process.

Verify the existence of a stale lock by doing (after killing rpm):
    cd /var/lib/rpm
    /usr/lib/rpm/rpmdb_stat -CA

Normal behavior is no locks with no rpm running.

The key imports fine with rpm-4.4.3-0.4, I suspect the fix is in rpm-4.4.1, calculating
pubkey fingerprints correctly. The changelog entry is (iirc):
    - fix: length of gpg V4 hash seed was incorrect (#146896).

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