From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57454 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5DoG-0001WD-JO for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:04:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5DoC-0000mn-AD for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:04:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5DoB-0000mJ-WC for qemu-devel@nongnu.org; Thu, 31 Mar 2011 05:04:52 -0400 Date: Thu, 31 Mar 2011 11:04:46 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCHv3] report that QEMU process was killed by a signal Message-ID: <20110331090446.GI7766@redhat.com> References: <20110315115604.GY10151@redhat.com> <20110330184348.GB7741@redhat.com> <20110330190433.GE7741@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org On Wed, Mar 30, 2011 at 09:51:29PM +0100, Peter Maydell wrote: > 2011/3/30 Gleb Natapov : > > On Wed, Mar 30, 2011 at 07:53:41PM +0100, Peter Maydell wrote: > >> I'm not convinced about the utility of printing the pid, personally. > >> Most programs get along fine without printing anything when > >> they receive a terminal signal. > > > Well qemu is a bit of special case. It is long running process that > > takes huge amount of memory and, as suchm it becomes a target of various > > monitoring script which, when configured incorrectly, start killing > > perfectly valid guests. In addition killing of the guest looks exactly > > like guest shutdown to management software because we call shutdow_request > > in the signal handler. > > That sounds like a flaw in the communication protocol between > qemu and the management software, which would be better fixed > by having qemu communicate the reason for exit directly (ie > not just by printing to stderr), surely? > Yes, but this is more complex and changes QMP protocol. > > Exactly. This should do the trick (not tested). > > Looks good, and a test shows I don't get the segfault any more. > > Reviewed-by: Peter Maydell > > although I guess you'll want to submit it with a sensible git > commit message :-) > Will do. -- Gleb.