From: Ian Campbell Subject: Re: [PATCH v12 01/17] libxl: fix removal of secondary consoles Date: Thu, 26 Jul 2012 11:48:35 +0100 Message-ID: <1343299715.6812.24.camel@zakaz.uk.xensource.com> References: <1343215161-27546-1-git-send-email-roger.pau@citrix.com> <1343215161-27546-2-git-send-email-roger.pau@citrix.com> <1343299381.6812.22.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1343299381.6812.22.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2012-07-26 at 11:43 +0100, Ian Campbell wrote: > On Wed, 2012-07-25 at 12:19 +0100, Roger Pau Monne wrote: > > Secondary consoles are processed by libxl with the rest of the > > devices by calling libxl__initiate_device_remove that waits for the > > device to reach state 6 before procceeding with the removal. > > > > When libxl is destroying the console devices, Qemu is already dead or > > dying, and xenconsoled completely ignores the state backend entry for > > console devices, since it performs the cleanup based on the result of > > reads/writes to the tty. > > > > Since we don't want to execute hotplug scripts for consoles, leave the > > behaviour as it was previously, and just nuke the backend/frontend > > xenstore entries by calling libxl__device_destroy. > > > > Report: http://markmail.org/message/yqgppcsdip6tnmh6 > > > > Cc: Ian Jackson > > Reported-by: Ian Campbell > > Signed-off-by: Roger Pau Monne > > --- > > tools/libxl/libxl_device.c | 12 +++++++++++- > > 1 files changed, 11 insertions(+), 1 deletions(-) > > > > diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c > > index a94beab..2120cfb 100644 > > --- a/tools/libxl/libxl_device.c > > +++ b/tools/libxl/libxl_device.c > > Reading through the entire funciton at the end of libxl__device_destroy > I see: > if (!numdev) drs->callback(egc, drs, rc); > > Does this not wedge up if there are no devices (existing issue) or now > if there is only console devices? > > Who calls the callback in this case? Nevermind, I had it backwards -- we call the callback iff we didn't kick off any async destroys, if we did then the callback happens there via devices_remove_callbac Ian. > > Ian.