From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7eIi-0000zb-3x for qemu-devel@nongnu.org; Fri, 18 Nov 2016 03:13:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7eId-0005NT-6b for qemu-devel@nongnu.org; Fri, 18 Nov 2016 03:13:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45490) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7eIc-0005NI-TE for qemu-devel@nongnu.org; Fri, 18 Nov 2016 03:13:31 -0500 References: <1478265017-5700-1-git-send-email-thuth@redhat.com> <87wpg5di5o.fsf@emacs.mitica> <20161117034511.GG18808@umbus.fritz.box> From: Thomas Huth Message-ID: Date: Fri, 18 Nov 2016 09:13:20 +0100 MIME-Version: 1.0 In-Reply-To: <20161117034511.GG18808@umbus.fritz.box> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HQAi9FC3v88Ci2lggHbQUlbT7bFjCUAQS" Subject: Re: [Qemu-devel] [PATCH for-2.8] migration: Fix return code of ram_save_iterate() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Juan Quintela Cc: Amit Shah , qemu-devel@nongnu.org, "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HQAi9FC3v88Ci2lggHbQUlbT7bFjCUAQS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 17.11.2016 04:45, David Gibson wrote: > On Mon, Nov 14, 2016 at 07:34:59PM +0100, Juan Quintela wrote: >> Thomas Huth wrote: >>> qemu_savevm_state_iterate() expects the iterators to return 1 >>> when they are done, and 0 if there is still something left to do. >>> However, ram_save_iterate() does not obey this rule and returns >>> the number of saved pages instead. This causes a fatal hang with >>> ppc64 guests when you run QEMU like this (also works with TCG): >>> >>> qemu-img create -f qcow2 /tmp/test.qcow2 1M >>> qemu-system-ppc64 -nographic -nodefaults -m 256 \ >>> -hda /tmp/test.qcow2 -serial mon:stdio >>> >>> ... then switch to the monitor by pressing CTRL-a c and try to >>> save a snapshot with "savevm test1" for example. >>> >>> After the first iteration, ram_save_iterate() always returns 0 here, >>> so that qemu_savevm_state_iterate() hangs in an endless loop and you >>> can only "kill -9" the QEMU process. >>> Fix it by using proper return values in ram_save_iterate(). >>> >>> Signed-off-by: Thomas Huth >> >> Reviewed-by: Juan Quintela >> >> Applied. >> >> I don't know how we broked this so much. >=20 > Note that block save iterate has the same bug... I think you're right. Care to send a patch? Thomas --HQAi9FC3v88Ci2lggHbQUlbT7bFjCUAQS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYLrgmAAoJEC7Z13T+cC21rmcQAJ+HLALvEbz83eLtosIrNhw2 rpOL9IQfmluLd96kTMGdHZ2KK848CbE+RKhRRUTu3Hdq+OwifTryIBNZAPFX+pIV BZHAYzJnfmXMDoEQWdotbFoUlRtWeX1NcWbVsyVXJN1ZSGe5DWsz0ZNrrzyGWAg2 Sizy/3zgAp6Re24Vg+x3RE+2tDqNz4SF4AbWBRvEiK+Qn+fwNLXgRbSahDWy+Tk6 WCWCk8gTsS5ZXPvOjB7DxFGWP6yjLEvbSPyiIIPNdapgWca9vPksnL3HphNkQsiP IWO4ePXjxh7zlDlsjZSdvRStFcXEnnvkrJxyZIwfH7mT6dqPituKhhWmDqZzBmM9 vA5Yx8VB4E1P8Mj4XA/E3YFBdV70KnmWQpSJ/sWJ96OuIEVqgQaNI6andJLgdcxV PagtOF85nZlGpmTu7zJdVahpKQjQj/dhQQrlPkHdN0sRdyRSJcKwGvyyVQXsmXzu pYJtT+k4aNkokTwurUg66aCNDzaKabAEi2So7d9LuCptDpPnrIWzHYTL4l+V/2m3 OSXGmf7MaASUjb9V/dW9adUurlmluLMEc38xThPpq+3s2214jJXHNO4teFXe29Cw iAYsugLS7py3iJSM+t0j785Q8DKzl5RA6T2bmfOuK5QRr+X2ONDVXvkmQEy2zh6F oFHBGks4sldkhdrd1faC =WOEY -----END PGP SIGNATURE----- --HQAi9FC3v88Ci2lggHbQUlbT7bFjCUAQS--