Subscribe to
Posts
Comments
One of the exciting things about upgrading to Fedora Core 6 is that the yum package manager now frequently hangs on me. This does not fill me with joy. The most common way in which it falls over is by hanging hard after printing this message:
Parsing package install arguments
What it means to “hang hard” here is that you can’t interrupt it using control-C, or by killing it with a normal, neighbourly signal like SIGINT or SIGTERM. A little bit of digging in another terminal window indicates why:
# pidof yum 30987
This number is yum’s process ID. Let’s see what it’s stuck doing:
# strace -p 30987 Process 30987 attached - interrupt to quit futex(0xb7bf21a0, FUTEX_WAIT, 2, NULL <unfinished …>
Ooh, look; it’s stuck in a futex system call. This usually means that the culprit is trying to lock a data structure in a memory-mapped file shared with another process. If the other process isn’t around, well, things can get exciting. By the way, it is possible to kill yum at this point; you just have to be brutal.
# killall -9 yum
Once the deed is done, a little sniffing around often reveals a few “__db.*” files in /var/lib/rpm. Let’s get rid of these:
# rm -f /var/lib/rpm/__db.*
At this point, retrying the hung yum command should succeed. At least, it does so for me in nine out of ten cases. Occasionally, I need to run “yum clean all” after cleaning up the above mess before yum can make progress.

20 Responses to “Dealing with yum hangs on FC6”

  1. on 04 Jan 2007 at 17:23John Levon

    Good to hear they still haven’t fixed this since RH9!

  2. on 13 Jan 2007 at 09:06Troed

    Thanks. I got this problem just now for the first time ever (RH9 + Fedora Legacy) and you entry here helped me out.

  3. on 14 Jan 2007 at 20:50Bimal

    hey this is really a very usefull one.. thanks for all of this. very helpfull to me

  4. [...] I finally found this useful post : Dealing with yum hangs on FC6 Basically, you have to remove theses files : rm -f /var/lib/rpm/__db.* ! [...]

  5. on 22 Jan 2007 at 23:57vahur

    What causes this? Some broken repository?

  6. on 28 Feb 2007 at 20:53Erika

    Thanks, this was causing yum and rpm to hang for me. It is always interesting to learn how to use command line tools like strace to figure out what is going on.

  7. on 05 Mar 2007 at 15:39John Chalmers

    This little resolution just resolved all my problems, I could not even do an rpm -qa before removing the db files. Top fix! Many thanks, John

  8. on 22 Mar 2007 at 08:58Greg

    This annoying little bugger is still cropping up on our fc6 machines. Fedora has kinda been dropping the ball on fc6. We have had so many problems with yum-updatesd that we just went back to using cron for scheduled updates. That and yum just keeps getting slower

  9. on 27 Apr 2007 at 11:07Steve Grodeon

    Thanks, I was stuck with this on my Senior Seminar project. Couldn’t figure out why yum kept hanging.

  10. on 07 May 2007 at 22:42Steve

    Thanks.. I was banging my head agaist a wall trying to figure out why yum would not update.. This solved it immidately.

  11. on 13 May 2007 at 20:38Jestem

    Thanks!
    Little fix, did the trick for me, too~!

  12. on 14 May 2007 at 22:12Abhijeet Mhatre

    Hi Bryan
    Thanks a lot for the post. It helped me too.

  13. on 09 Jun 2007 at 16:34Ashley Raiteri

    It’s pretty great when you can simply google -” yum hangs” and end up at a post that suggests clearing out the ___db.* files.

    I’ve been around the block and would have seen the mutex block, that’s pretty much the reason for almost all hangs (except for infinite recursion loops)…but knowing what to do about it, and having it work.

    Wow! It may not be the personal jetpacks or flying cars we were promised by futurists but it sure feels like progress.
    Thanks!

  14. on 11 Jun 2007 at 09:48Vins

    This solution works very well, however I wonder how the author came up to this solution.

    Thanks for the post though.

  15. on 11 Jun 2007 at 10:54Marcus

    Thank you so much - I’ve been having “yum clean packages” commands hanging and clogging up because of cron jobs for a while now.

    Your solution has returned my box to it’s previous happy state!

    Marcus

  16. on 13 Jun 2007 at 10:01Jonathan Konrad

    I am having a very similar problem with RHEL5 server. Yum will not run. It mentions that it is already running (The graphical software update will not run either).

    If I go to System Monitor and find the PID for yum-updatesd, then use kill from the terminal with that PID I can then run yum once. After that, the yum-updatesd is back.

    I removed the __db.* as you mentioned, but that does not seem to help me. Horribly frustrating. I have formated and installed this system 5 times. The system seems to work, but I cannot add anything later with yum.

    Further thoughts?

  17. on 17 Aug 2007 at 13:57Wilson Bilkovich

    Thank you for this. I got stuck with Fedora 6 on a client project, and these hangs were killing me.

  18. on 13 Sep 2007 at 18:41Richard S.

    My yum was getting stuck right at “Parsing package install arguments,” and the steps listed above fixed it! Thank you — I was working on this for a long time!

  19. on 22 Oct 2007 at 08:25Senad

    Man, you saved me almost reinstalling FC6. Many thanks.

  20. on 25 Dec 2007 at 13:49unka

    thanks a lot!
    first time when i removed those files manualy (shift+del) it didn’t help, it got stuck again, and when when i did it for the second time from console it worked! thanks!

Leave a Reply