Date: Fri, 19 Sep 2008 11:58:32 -0600 From: "Andrew Falanga" <af300wsm@gmail.com> To: stevefranks@ieee.org Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: kill -KILL fails to kill process Message-ID: <340a29540809191058v51e0e6d2mb00623f8a0d5abfd@mail.gmail.com> In-Reply-To: <539c60b90809191041p2490130exa024b1f84d44b2f3@mail.gmail.com> References: <539c60b90809191041p2490130exa024b1f84d44b2f3@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 19, 2008 at 11:41 AM, Steve Franks <stevefranks@ieee.org> wrote: > Which I thought was impossible. Neophyte question, no doubt, but > googling was less than helpful (which probably means I'm fubar, no > doubt). Anyway, I have a certain common X app (xmms) that likes to > hang (since my last buildworld, it seems) when when it's right about > to open a file-choosing dialog. The only way to get rid of it is to > reboot. Now, given the behavior, I'd have to suspect something > underlying as the true source of the problem, but shouldn't kill kill > it anyway - I mean, isn't there some way to kill a process that's > stuck waiting on a child process? I haven't figured out how to "ps > -ax grep | some neublous file dialog process" yet...so I'm sort of > stuck wanting to kill the parent... > I remember the first time this happened to me. I was stunned. I thought kill -9 (or kill -KILL) would kill any process. Even the manual page for kill, kill(1), says that this signal is non-catchable, non-ignorable. In my experience, there's only one condition that will cause this (perhaps those more experienced here than I know of others). This can happen when your process blocks on pending file I/O. The process opens a file descriptor, could even be a socket, and leaves it marked as blocking. The kernel then blocks the process while awaiting I/O in the buffers. In this blocked state, the signal is prevented from being delivered. If you left the process open long enough, perhaps assuming it's not completely hung, the process would get what it's waiting for (hopefully), then move on. At that very moment, the kill signal would be delivered and the process would die (as you wanted it to so very long ago when you delivered that signal to it). I don't run xmms so perhaps some other kind soul here will know what's going on. However, that's why your process didn't die. Andy -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?340a29540809191058v51e0e6d2mb00623f8a0d5abfd>