Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I run a number of CentOS servers. I was recently doing the occasional yum update but this failed on a handful of the servers. On most I have been able to move forward by doing:

# yum clean all
# rm -f /var/lib/rpm/__db*
# rpm --rebuilddb
# yum update

However on one server, the yum clean command hangs. I have tried running:

# yum -v --noplugins clean all

but I get no output at all. Yum just hangs, and will sit there for hours if I let it, not using any cpu, just stopped. Doing

# strace -f yum -v --noplugins clean all

produces quite a lot of output, but then stops with:

stat64("/var/lib/rpm/__db.003", {st_mode=S_IFREG|0644, st_size=450560, ...}) = 0
open("/var/lib/rpm/__db.003", O_RDWR|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 450560, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0xb6b34000
close(4)                                = 0
stat64("/var/lib/rpm/Packages", {st_mode=S_IFREG|0644, st_size=14938112, ...}) = 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
read(4, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\10\0\0\0\0\20\0\0\0\10\0\0k\t\0\0"..., 512) = 5
close(4)                                = 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 4
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=14938112, ...}) = 0
futex(0xb6b7bd1c, FUTEX_WAIT, 1, NULL

At this point I'm feeling stuck. This is a production server, so I don't want to just blow it away, or even blow away all the yum information. Apart from the yum stuff, the server is working fine.

share|improve this question
do you have any nfs mounted filesystems that are currently hung? – Tom H May 25 '12 at 11:15
What does lsof reveal, if anything? – Janne Pikkarainen May 25 '12 at 11:21
There is a single root fs (with plenty of space) and then just proc, sysfs and tmpfs (and tmpfs has plenty of space). – Hamish Downer May 25 '12 at 12:46
@JannePikkarainen - lsof /var/lib/rpm/Packages originally showed an old rpm process. I've killed that, and my yum, checked that lsof didn't show anything else accessing the file, and tried again, but I stop at the same place. I've also scanned through the full lsof output and not seen anything that looks likely. – Hamish Downer May 25 '12 at 12:56
Try doing the yum clean all along with yum update after rebuilding the databases (rm -f /var/lib/rpm/__db* and rpm --rebuilddb) instead of before. – Brian Jul 12 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.