Developer Tools Blog

Evolphin, Version Control, Visual Workflow, Collaboration software, Version Cue, Subversion

Fixing yum hangs on Fedora Core 6 (FC6)

March 8th, 2007 by rahul

The fabolous thing about upgrading to Fedora Core 6 has been that the yum package manager now routinely hangs on my machine. This does not make for a fun experiecne. For me it typically hangs hard after a pop-up message:

Retreiving software information

A little bit of detective work in another terminal indicates why:

# ps -leaf | grep `cat /var/run/`

This number is Pirut’s yum process ID. Let’s see what it’s stuck doing:

# strace -p `cat /var/run/
[root@rahul ~]# strace -p 2524
Process 2524 attached – interrupt to quit
ioctl(4, FIONREAD, [0])                 = 0
poll( <unfinished …>

Check, this out; it is waiting in a poll system call. This usually implies that the process is waiting for a network IO event to happen. If the previous pirut process is gone, well, things can get to this mess. By the way, it is possible to nuke pirut yum at this point; you just have to be brutal.

# pkill -9 pirut

Once this is done, a little digging around often shows a couple of __db.* files in /var/lib/rpm. Let’s nule all of these:

# rm -rf /var/lib/rpm/__db.*

At this juncture, retrying the hung yum/pirut command should work. At least, it does so for me. Sometimes, I need to run “yum clean all” after cleaning up the above mess before yum can make progress.

Posted in Server Side | No Comments »

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.