when a process cann't be terminated through kill/skill/pkill/killall...
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
when a process cann't be terminated through kill/skill/pkill/killall...
I have tried su root, then
kill -9
pkill -9
skill TERM
skill KILL
killall
all cann't terminate a rpm process...
How to handle this case, except rebooting the server?
NOTE: there's a question mark above following "2852", does it mean something was going wrong?
And now I just cann't install any rpm packages. Are there any tricks to make the lock-break of rpm?
Code:
# rpm -qa
warning: waiting for shared lock on /var/lib/rpm/Packages
error: cannot get shared lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
no packages
But I just cannot reboot the server right away, because many important tasks are running?
The question mark probably means it's a zombie process (the process itself has died but its parent process is still running. You'll either have to find and terminate the parent process or wait for the parent process to exit.
As for the second question, this could be due to two reasons. Either you already have something in the system using the files in question (e.g. another rpm installation), or you don't have root privileges. These two give pretty much the same error message.
Well, I have su root before installing the rpm package.
And please see the state of this rpm process. It is in D state, which means this process is waiting in uninterruptible disk sleep, thus make it could not be killed in a normal way...
So I wish to find some kernel class process manager? (maybe somehow like a rootkit...)
I currently have two such files at that location in Mandriva, __db.001 and __db.002, both dated today, although I have not used any rpm command today. They must be elsewhere on your system. I found searching for files in SuSE quite complicated. This is the advice I recorded from a SuSE user:
Quote:
Finding files in SUSE is not that complicated. Sure, using 'find' is not very convenient. But if you install findutils-locate, you get a nice tool for quickly finding files on your system (the first run of updatedb takes some time, but after that, it's a matter of split-seconds). To find executables, I use 'which <command>'. Then there is the rpm query command, e.g. 'rpm -ql kdeutils3-extra | grep bin' and the tool 'pin' to search the archive of your installation medium. These are all very quick and handy tools. The way I found kjots was to use the search function of YaST.
Surely there is a file finder tool?
The command nl /etc/rc.d/rc.sysinit | grep rpm returned 854 rm -f /var/lib/rpm/__db* &> /dev/null
By the way, a process with state 'D' cannot be killed (it's in uninterruptible sleep). When a process is hung this way, I'm not aware of any way to get rid of it short of a reboot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.