The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Runaway Process - Rpmq

Discussion in 'General Discussion' started by lloyd_tennison, Oct 11, 2004.

  1. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    I seem to be having a runaway proces the last week or so. The process is "rpmq" and it is taking up to 99% of the cpu time. Not only does it slow the whole server down, when the backup happens the server is now practically dead for up to the 7.5 hours the backup is now taking. (Only backing up 2 gigs to local drive.)


    I cannot find any info on rpmq - but it seems it is called in upcp -as the time it is ruuning matches when the backup starts. I saw some notes in Google that it has to do with the rpm database and tried rebuliding that, using:

    rm -f /var/lib/rpm/_db*
    rpm --rebuilddb -vv


    Another suggestion was to: verify first, with:

    /usr/lib/rpm/rpmdb_verify Packages

    but there does not seem to exist that command. (from Redhat bugzilla report.)

    Any thoughts?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I've seen that when the rpm database gets a futex lock. It's a real pain. What you've found is correct. However, first you have to kill any processes that have the rpm database open using:

    lsof | grep rpm

    Make sure that they are to do with rpm and not innocent bystanders ;) Kill them with:

    kill -9 PID

    The PID is the second column in lsof.

    Then do the commands that you found:

    rm -f /var/lib/rpm/_db*
    rpm --rebuilddb -vv

    If the rpm rebuild hangs (it could take quite a while ~20 minutes) then the only other way to clear the futex is to reboot the server. You should then run the rpm rebuild again to make sure that you don't have a corrupt rpm database.
     
  3. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    Should I be doing ONLY the rpm - or the rpm, rpmq and ensurerpm? I have almost 2800 (2787) running processes of these - is this normal?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You should be doing any process that has any files open in /var/lib/rpm/. Perhaps a better lsof would be:

    lsof | grep /var/lib/rpm/

    You will need to kill all process ID's that come up with that command. You may have a lot of them if it's been going on for a few days. As I mentioned before, if you feel more comfortable, a simple reboot should resolve the issue.
     
Loading...

Share This Page