Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-10-2006, 05:56 AM
|
#1
|
|
LQ Newbie
Registered: Jul 2006
Posts: 10
Rep:
|
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?
The process state is always the same:
Code:
root 32422 0.0 0.1 17488 2852 ? D 14:26 0:00 rpm -ivh abc.rpm
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?
Does this matter with the NFS, NIS services?
my OS: SuSE 9.3
|
|
|
|
07-11-2006, 03:43 AM
|
#2
|
|
Member
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513
Rep:
|
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.
|
|
|
|
07-11-2006, 05:14 AM
|
#3
|
|
LQ Newbie
Registered: Jul 2006
Posts: 10
Original Poster
Rep:
|
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...)
What's your suggestion?
|
|
|
|
07-11-2006, 05:17 AM
|
#4
|
|
Member
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513
Rep:
|
I'm afraid this is beyond my knowledge.
|
|
|
|
07-11-2006, 06:18 AM
|
#5
|
|
Member
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 299
Rep:
|
|
|
|
|
07-15-2006, 12:07 AM
|
#6
|
|
LQ Newbie
Registered: Jul 2006
Posts: 10
Original Poster
Rep:
|
Quote:
|
Originally Posted by noranthon
|
It said that the "lock" of rpm database could be fixed by:
rm -f /var/lib/rpm/__db*
Well, there aren't any "__db*" files under /var/lib/rpm/ directory in SuSE...so the webpage above may mainly talked about Red Hat Linux
So I just don't know how to unlock the rpm database in my SuSE 9.3.....
|
|
|
|
07-15-2006, 11:50 PM
|
#7
|
|
Member
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 299
Rep:
|
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
|
|
|
|
07-16-2006, 12:24 AM
|
#8
|
|
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250
Rep:
|
You could also try "kill -9 pid" on your sleeping process
|
|
|
|
07-18-2006, 09:51 PM
|
#9
|
|
LQ Newbie
Registered: Jul 2006
Posts: 10
Original Poster
Rep:
|
Thank you!
|
|
|
|
07-18-2006, 11:16 PM
|
#10
|
|
Moderator
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,505
Rep: 
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:50 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|