Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
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?
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:
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.
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.
Something is wrong. Rebuild shouldn't take anywhere near that long.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.