From: Yang Hongyang Subject: [PATCH] xl/libxl: fix migrate/Remus regression (core dumped) Date: Mon, 22 Dec 2014 15:33:24 +0800 Message-ID: <1419233604-859-1-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Wei Liu , Yang Hongyang , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org When excuting xl migrate/Remus, the following error occurd: [root@master xen]# xl migrate 5 slaver migration target: Ready to receive domain. Saving to migration stream new xl format (info 0x1/0x0/1225) Loading new save file (new xl fmt info 0x1/0x0/1225) Savefile contains xl domain config in JSON format Parsing config from Segmentation fault (core dumped) This is because CTX->xce is used without been initialized. The bug was introduced by commit 2ffeb5d7f5d8 libxl: events: Deregister evtchn fd when not needed which remove the initialization of xce from libxl__ctx_alloc. This patch initialze the CTX->xce before use it. Signed-off-by: Yang Hongyang Cc: Ian Jackson Cc: Ian Campbell Cc: Konrad Rzeszutek Wilk Cc: Wei Liu --- tools/libxl/libxl_dom.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 74ea84b..8910b79 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -1824,6 +1824,7 @@ void libxl__domain_suspend(libxl__egc *egc, libxl__domain_suspend_state *dss) port = xs_suspend_evtchn_port(dss->domid); if (port >= 0) { + libxl__ctx_evtchn_init(gc); dss->guest_evtchn.port = xc_suspend_evtchn_init_exclusive(CTX->xch, CTX->xce, dss->domid, port, &dss->guest_evtchn_lockfd); -- 1.7.1