I am always very hesitant to run kill -9, but I see other admins do it almost routinely.I figure there is probably a sensible middle ground, so:When and why should kill -9 be used? When and why not?What should be tried before doing it?What kind of debugging a hung process could cause further problems?
When should I not kill -9 a process?
linux;kill;process management
Generally, you should use kill -15 before kill -9 to give the target process a chance to clean up after itself.  (Processes can't catch or ignore SIGKILL, but they can and often do catch SIGTERM.)  If you don't give the process a chance to finish what it's doing and clean up, it may leave corrupted files (or other state) around that it won't be able to understand once restarted.strace/truss, ltrace and gdb are generally good ideas for looking at why a stuck process is stuck.   (truss -u on Solaris is particularly helpful; I find ltrace too often presents arguments to library calls in an unusable format.)  Solaris also has useful /proc-based tools, some of which have been ported to Linux.  (pstack is often helpful).