Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157269 - rpm hangs / freezes -- rpmk displayed in ps
Summary: rpm hangs / freezes -- rpmk displayed in ps
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-09 23:56 UTC by Aaron C. de Bruyn
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-08-27 02:44:59 UTC

Attachments (Terms of Use)
Output of: strace -fF -o /tmp/rpm.strace rpm --import somekey (deleted)
2005-05-12 03:52 UTC, Aaron C. de Bruyn
no flags Details

Description Aaron C. de Bruyn 2005-05-09 23:56:37 UTC
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-10 00:57:27 UTC
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  The KeyID
is 30c9ecf8 (Fedora Project -

I import that into gpg using
gpg --keyserver --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 15:43:40 UTC
Could you attach the output of

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

Comment 3 Aaron C. de Bruyn 2005-05-12 03:52:26 UTC
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-12 03:56:43 UTC
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-27 02:44:59 UTC
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.