RPM Hangs on RHEL 3
Hello all...
Running Red Hat Enterprise Linux 3 on a 2.4 kernel. The other day I went to query the RPM database (rpm -qa |grep SDD) and after about 30 minutes I noticed that I had no results and the command did not complete. So I ran rpm -qa with no grep on a second terminal, and it hung, with no output. Control C did not cancel the commands. viewing the processlist showed about 40 rpm queries running, using the following entries: root 29389 28763 0 06:02 ? 00:00:00 /bin/sh /etc/cron.daily/rpm root 29390 28763 0 06:02 ? 00:00:00 awk -v progname=/etc/cron.daily/rpm progname {????? print progname ":\n"????? progname="";???? }???? { print; } root 29391 29389 0 06:02 ? 00:00:00 /usr/lib/rpm/rpmq -q --all --qf %{name}-%{version}-%{release}.%{arch}.rpm\n None of them appeared to be going anywhere either (they stretched back for a while). So i attempted a kill command on my rpm queries, with no results. I had to resort to kill-9. I killed all the rpm commands that appeared in the process list too. They weren't doing anything, I thought maybe the original one hung up and they all got stuck. But still, rpm queries keep failing. What's going on with my rpm database? on an aside, I noticed too that my locate database is more than 8 days out of date. Not sure when that stopped working. Could it be related? Thanks in advance. --zigg |
You could try to rebuild the rpm data base using the rpm command:
rpm --rebuilddb See: man rpm -------------------- Steve Stites P.S. Another possibility is that there may be a lock file for the rpm data base which did not get deleted properly. I don't remember where the rpm data base lock file is. It might be in /var or perhaps /etc. You could try to find it with these commands: find /var -iname "*lock*" find /etc -iname "*lock*" |
I found a lock file here: /usr/lib/rpm/rpmdb_deadlock
but that file was created in April of 2006. I didn't see any lock files pertaining to rpm in /var or /etc. Most of the lock files dealt with databases, the rest were rsync, nfs, etc. I am running the rpm --rebuilddb -v now, but it's been 10 minutes and there has been no output from this command. I don't think it's actually doing anything, but I'll give it some more time and see. This is our main production server, so I may reboot it this weekend to see if that clears up whatever the issue is. Thanks for the help. --zig |
Quote:
I took a look at my CentOS system which is rpm based. It has a file called /usr/lib/rpm/rpmdb_deadlock even though I am not currently booted into CentOS. -------------------------- Steve Stites |
Quote:
Any troubleshooting suggestions? |
Quote:
------------------- Steve Stites |
Apparently, this was the problem:
Quote:
Thanks for the help though! |
remove cached DB
rm -rf /var/lib/rpm/__db.00* rpm --rebuilddb for advanced debugging (while hanged ) strace rpm -qa |
All times are GMT -5. The time now is 10:44 PM. |