I am ROOT, by Gawd, and I say "killall -9 httpd" ... and they DON'T!
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
No, this is a solitary box running OS/X Lion (BSD ...), with no NFS in sight.
What I observed is that, with only 7.5GB of 12.0GB physical RAM allocated, and with less than 2% CPU utilization, more than fifty HTTPD slave processes could not be killed with "-SIGKILL."
Furthermore, when we issued the "shutdown" command, apparently it never did so. (Apparently it never completely shut down, although it had teminated all SSH and/or VNC access by then.)
Maybe you can try kill -9 -kill pid#.. I recently has something similar happen in a live cd where I couldnt delete a file in my home directory as root... Maybe it has something to do with an another program keeping an inode link open but, just a wild guess.. You could try ps -ax f to get a forest view of how daemons relate to eachother
Last edited by linux4evr5581; 12-29-2016 at 03:47 PM.
I was going to look at your 'ps aux' output and see whether you had some Uninteruptable Sleep/Zombie Processes running which will ignore kill -9. But I now realize that this is OS/X, not Linux (confused myself because of the "Linux can't possibly do this" statement). I am unfamiliar with Apple and I'm unsure whether they have UiS/Z processes or not and I'm unable to test.
Wait, just so I can understand, you're running OS/X, asking for help on a Linux forum (Linux - Server), and say "Linux can't possibly(!) do this."
Is there something I'm missing here?
... because I reasonably expect that the two systems are probably similar enough that a Linux forum might have some insight. The "ps" flags certainly are. I'll check carefully to see if there are any zombies or unusual wait-codes for these processes, but basically I am flummoxed by encountering any Unix/Linux environment where "kill -9" was shrugged-off. I have never seen similar behavior, well, anywhere.
Kill by specific PID also had no effect. And, I mean, c'mon ... these are just perfectly ordinary Apache worker processes running "httpd" under a nobody-like uid/gid, with no blue body-suit or red cape in sight.
Last edited by sundialsvcs; 12-30-2016 at 07:49 AM.
It's entirely possible that kill -9 not work. A process has to 'accept' the kill. If it is unable to, because it is in Uninteruptable Sleep for example, then it will not honor the kill -9 signal. This happens often on NFS, to the point where they actually added a new process state code called something like 'nfs unavailable' to deal with it.
There is some explanation in the linux world if you just google for 'linux kill 9 not working'
In Scenario 1, we demonstrate an instance in which a process cannot be killed.
Scenario 1: Troubleshooting a Process That Does Not Respond to kill
A user begins rewinding a tape but realizes that the wrong tape is in the drive. The user tries to kill the job but must wait for the process to finish.
Why?
The mt command has made an ioctl call to the SCSI tape driver (st) and must wait for the driver to release the process back to user space so that use signals will be handled.
[root@atlorca2 root]# kill -9 9225
[root@atlorca2 root]# echo $? # This produces the return code for the previous command. 0 = success
0
[root@atlorca2 root]# ps -elf | grep 9225
0 D root 9225 8916 0 24 0 - 112 wait_f 20:46 pts/1 00:00:00 mt -f /dev/st0
The mt command has entered a wait channel, and after the code returns from the driver, the signal will be processed.
Let's check the pending signals:
cat ../9225/status
Name: mt
State: D (disk sleep)
Tgid: 9225
Pid: 9225
PPid: 8916
TracerPid: 0
Uid: 0 0 0 0
Gid: 0 0 0 0
FDSize: 256
Groups: 0 1 2 3 4 6 10
VmSize: 2800 kB
VmLck: 0 kB
VmRSS: 640 kB
VmData: 96 kB
VmStk: 16 kB
VmExe: 32 kB
VmLib: 2560 kB
SigPnd: 0000000000000100 <-- SigPnd is a bit mask which indicates the value of the pending signal. Each byte
accounts for 4 bits. In this case, the pending signal has a value of 9, so the first bit on the 3rd byte is set. This
algorithm is detailed in linux/fs/proc/array.c under the render_sigset_t() function. The following table
illustrates this function.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.