LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 07-10-2006, 05:56 AM   #1
Osirix
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Rep: Reputation: 0
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
 
Old 07-11-2006, 03:43 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
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.
 
Old 07-11-2006, 05:14 AM   #3
Osirix
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
Old 07-11-2006, 05:17 AM   #4
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
I'm afraid this is beyond my knowledge.
 
Old 07-11-2006, 06:18 AM   #5
noranthon
Member
 
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 301

Rep: Reputation: 30
I found this on the rpm site: http://www.rpm.org/hintskinks/repairdb/
 
Old 07-15-2006, 12:07 AM   #6
Osirix
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by noranthon
I found this on the rpm site: http://www.rpm.org/hintskinks/repairdb/

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.....
 
Old 07-15-2006, 11:50 PM   #7
noranthon
Member
 
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 301

Rep: Reputation: 30
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
 
Old 07-16-2006, 12:24 AM   #8
rickh
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: Reputation: 62
You could also try "kill -9 pid" on your sleeping process
 
Old 07-18-2006, 09:51 PM   #9
Osirix
LQ Newbie
 
Registered: Jul 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you!
 
Old 07-18-2006, 11:16 PM   #10
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM
killall process not working on AS 3.0 skiski Linux - Software 1 08-31-2004 01:11 AM
kill/killall not working (?) didi156 Linux - Software 2 05-20-2004 11:47 PM
kill vs. killall, AIX vs. Linux thebeaglebeagle Linux - Newbie 1 09-24-2003 02:41 AM
kill process dvong3 Linux - Newbie 8 07-08-2003 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration