From: Wei Liu Subject: Re: [PATCH 1/4] libxl: event handling: Add an assert to egc_run_callbacks Date: Mon, 9 Feb 2015 16:20:25 +0000 Message-ID: <20150209162024.GC30747@zion.uk.xensource.com> References: <1423497072-7835-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1423497072-7835-1-git-send-email-ian.jackson@eu.citrix.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: Ian Jackson Cc: Jim Fehlig , xen-devel@lists.xensource.com, Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Mon, Feb 09, 2015 at 03:51:09PM +0000, Ian Jackson wrote: > Check that the ao is still live when we are about to running some of > its callbacks. > > This reveals an existing bug in libxl which is exercised by libvirt, > converting > libvirtd: libxl_event.c:1792: libxl__ao_complete_check_progress_reports: Assertion `ao->in_initiator' failed. > into > libvirtd: libxl_event.c:1338: egc_run_callbacks: Assertion `aop->ao->magic == 0xA0FACE00ul' failed. > > Signed-off-by: Ian Jackson > CC: Ian Campbell > CC: Wei Liu > CC: Jim Fehlig Acked-by: Wei Liu > --- > tools/libxl/libxl_event.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c > index 0d874d9..ae73728 100644 > --- a/tools/libxl/libxl_event.c > +++ b/tools/libxl/libxl_event.c > @@ -1335,6 +1335,7 @@ static void egc_run_callbacks(libxl__egc *egc) > aop->how->callback(CTX, aop->ev, aop->how->for_callback); > > CTX_LOCK; > + assert(aop->ao->magic == LIBXL__AO_MAGIC); > aop->ao->progress_reports_outstanding--; > libxl__ao_complete_check_progress_reports(egc, aop->ao); > CTX_UNLOCK; > -- > 1.7.10.4