[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: event handling: Add an assert to egc_run_callbacks



commit 6b5a5bba1a8025040947f39f1c80012373f35efe
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Mon Feb 9 15:10:11 2015 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Feb 9 17:41:17 2015 +0000

    libxl: event handling: Add an assert to egc_run_callbacks
    
    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 <Ian.Jackson@xxxxxxxxxxxxx>
    CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
    CC: Wei Liu <wei.liu2@xxxxxxxxxx>
    CC: Jim Fehlig <jfehlig@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl_event.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.