From owner-freebsd-questions@FreeBSD.ORG Fri Sep 19 17:58:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C0561065676 for ; Fri, 19 Sep 2008 17:58:34 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id B81138FC08 for ; Fri, 19 Sep 2008 17:58:33 +0000 (UTC) (envelope-from af300wsm@gmail.com) Received: by gxk10 with SMTP id 10so973694gxk.19 for ; Fri, 19 Sep 2008 10:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=oESYHz2ZOecYcR8qXb+WYwDxnHxQyStg5jYcbl1eDtY=; b=HINYlnH7/na9nuCgK+vEEnlB6yu8/8U0lmmO1G2ZOqd//yarZtR+F/cQAHjVIhSdFm GkOWH2tM6RHJIS8q2WDfe6/eXglE853LcXEjx26U8ZApZfiavAQ85OovgbIXoN5xNWdQ RkUNM3+6hJPMD9T6+eBDrCZTW3gjZdyxopzhQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=IJBCVUK8/h/dXfGB9xDnCb+zbMpiS62S7GhLNnFuPIfdVqTppue0v7QbpYjSmWq9ZW Zl7HyJpQFDmFpXbQjFg6A5avmy3MM91IHjGPe6DUN6yLynfcuRddj8vtg14OasjDqWiK G/6v2PVxsI5ZhbBm+1WCdHWZa2KC4VpeczLGg= Received: by 10.151.48.15 with SMTP id a15mr3545443ybk.121.1221847112944; Fri, 19 Sep 2008 10:58:32 -0700 (PDT) Received: by 10.150.147.21 with HTTP; Fri, 19 Sep 2008 10:58:32 -0700 (PDT) Message-ID: <340a29540809191058v51e0e6d2mb00623f8a0d5abfd@mail.gmail.com> Date: Fri, 19 Sep 2008 11:58:32 -0600 From: "Andrew Falanga" To: stevefranks@ieee.org In-Reply-To: <539c60b90809191041p2490130exa024b1f84d44b2f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <539c60b90809191041p2490130exa024b1f84d44b2f3@mail.gmail.com> Cc: FreeBSD Mailing List Subject: Re: kill -KILL fails to kill process X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 17:58:34 -0000 On Fri, Sep 19, 2008 at 11:41 AM, Steve Franks 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?