Received: from eggs.gnu.org ([2001:4830:134:3::10]:46313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5UgS-0006j1-HM for qemu-devel@nongnu.org; Wed, 25 May 2016 05:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5UgL-0006Oz-LQ for qemu-devel@nongnu.org; Wed, 25 May 2016 05:00:55 -0400 Received: from indium.canonical.com ([91.189.90.7]:53232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5UgL-0006Oq-GB for qemu-devel@nongnu.org; Wed, 25 May 2016 05:00:49 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1b5UgK-0000Ht-TC for ; Wed, 25 May 2016 09:00:48 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D986B2E80C1 for ; Wed, 25 May 2016 09:00:48 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 25 May 2016 08:50:45 -0000 From: Marc Brothier <1585533@bugs.launchpad.net> Reply-To: Bug 1585533 <1585533@bugs.launchpad.net> Sender: bounces@canonical.com References: <20160525084629.27127.82209.malonedeb@gac.canonical.com> Message-Id: <20160525085045.22246.27766.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1585533] Re: cache-miss-rate / Invalid JSON List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Sorry, the bug is in libvirt -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1585533 Title: cache-miss-rate / Invalid JSON Status in QEMU: Invalid Bug description: Hi, We have VMs which were started with an older version than qemu 2.1 which added "cache-miss-rate" property for XBZRLECacheStats. While trying to migrate the VM to a new host which is running a higher version (2.3) of Qemu we got an exception: virJSONValueFromString:1642 : internal error: cannot parse json {"return"= : {"expected-downtime": 1, "xbzrle-cache": {"bytes": 0, "cache-size": 67108= 864, "cache-miss-rate": -nan, "pages": 0, "overflow": 0, "cache-miss": 8933= }, "status": "active", "disk": {"total": 429496729600, "dirty-sync-count": = 0, "remaining": 193896382464, "mbps": 0, "transferred": 235600347136, "dupl= icate": 0, "dirty-pages-rate": 0, "skipped": 0, "normal-bytes": 0, "normal"= : 0}, "setup-time": 13, "total-time": 1543124, "ram": {"total": 8599183360,= "dirty-sync-count": 4, "remaining": 30695424, "mbps": 830.636997, "transfe= rred": 3100448901, "duplicate": 1358341, "dirty-pages-rate": 7, "skipped": = 0, "normal-bytes": 3082199040, "normal": 752490}}, "id": "libvirt-186200"}:= lexical error: malformed number, a digit is required after the minus sign. 67108864, "cache-miss-rate": -nan, "pages": 0, "overflow": 0 (right here) ------^ virNetClientStreamRaiseError:191 : stream aborted at client request = Would it be possible to improve the JSON parser to skip the key if the va= lue is incorrect instead of throwing an exception? Then hopefully qemu 2.3 = or higher is able to handle the data without this property, falling back to= its default. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1585533/+subscriptions