You are not logged in.

#1 2018-08-15 21:20:18

dantakka
Member
Registered: 2018-03-25
Posts: 11

[SOLVED] libvirt - internal error: failed to parse JSON

Hello,

I have some issues with virt-manager. For the past few days every time I try to connect to a virtual machine it shows me the following error:

Error connecting to graphical console:
internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'

The interesting part is that the virtual machine starts but only when I open it then the error appears. I tried creating other virtual machines, reinstalled virt-manager but with no success. The virtual machines are using the Spice Server but the result is the same when I try other graphic outputs.

The same issue appears when I try to shut down the virtual machine.

Error shutting down domain: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1479, in shutdown
    self._backend.shutdown()
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 2488, in shutdown
    if ret == -1: raise libvirtError ('virDomainShutdown() failed', dom=self)
libvirtError: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'

The same thing happens when I try to reboot the virtual machine. The only possible solution is to force off the guest. Below is the virt-manager.log from the moment I start it.

[Thu, 16 Aug 2018 00:01:10 virt-manager 9735] DEBUG (cli:265) Launched with command line: /usr/share/virt-manager/virt-manager
[Thu, 16 Aug 2018 00:01:10 virt-manager 9735] DEBUG (virt-manager:185) virt-manager version: 1.5.1
[Thu, 16 Aug 2018 00:01:10 virt-manager 9735] DEBUG (virt-manager:186) virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'>
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (virt-manager:216) PyGObject version: 3.28.3
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (virt-manager:220) GTK version: 3.22.30
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:500) libguestfs inspection support: False
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (systray:156) Showing systray: True
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:1038) processing cli command uri= show_window= domain=
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:1040) No cli action requested, launching default window
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (manager:207) Showing manager
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:405) window counter incremented to 1
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:162) Loading stored URIs:
qemu:///system
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (engine:141) Initial gtkapplication activated
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:602) conn=qemu:///system changed to state=Connecting
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1019) Scheduling background open thread for qemu:///system
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1071) libvirt version=4006000
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1073) daemon version=4006000
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1074) conn version=2012001
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1076) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>69dfaa81-51fe-11cb-b8ab-868c79d95b32</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>IvyBridge-IBRS</model>
      <vendor>Intel</vendor>
      <microcode version="32"/>
      <topology sockets="1" cores="2" threads="2"/>
      <feature name="ds"/>
      <feature name="acpi"/>
      <feature name="ss"/>
      <feature name="ht"/>
      <feature name="tm"/>
      <feature name="pbe"/>
      <feature name="dtes64"/>
      <feature name="monitor"/>
      <feature name="ds_cpl"/>
      <feature name="vmx"/>
      <feature name="smx"/>
      <feature name="est"/>
      <feature name="tm2"/>
      <feature name="xtpr"/>
      <feature name="pdcm"/>
      <feature name="pcid"/>
      <feature name="osxsave"/>
      <feature name="arat"/>
      <feature name="ssbd"/>
      <feature name="xsaveopt"/>
      <feature name="invtsc"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <iommu support="no"/>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">7847916</memory>
          <pages unit="KiB" size="4">1961979</pages>
          <pages unit="KiB" size="2048">0</pages>
          <distances>
            <sibling id="0" value="10"/>
          </distances>
          <cpus num="4">
            <cpu id="0" socket_id="0" core_id="0" siblings="0-1"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="0-1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2-3"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="2-3"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <cache>
      <bank id="0" level="3" type="both" size="3" unit="MiB" cpus="0-3"/>
    </cache>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+99:+996</baselabel>
      <baselabel type="qemu">+99:+996</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.12</machine>
      <machine canonical="pc-i440fx-2.12" maxCpus="255">pc</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-i440fx-2.8</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.9</machine>
      <machine maxCpus="255">pc-i440fx-2.6</machine>
      <machine maxCpus="255">pc-i440fx-2.7</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine maxCpus="255">pc-i440fx-2.5</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="288">pc-q35-2.11</machine>
      <machine maxCpus="288">pc-q35-2.12</machine>
      <machine canonical="pc-q35-2.12" maxCpus="288">q35</machine>
      <machine maxCpus="288">pc-q35-2.10</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="288">pc-q35-2.9</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.7</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-i440fx-2.11</machine>
      <machine maxCpus="288">pc-q35-2.8</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine maxCpus="255">pc-q35-2.5</machine>
      <machine maxCpus="255">pc-q35-2.6</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-i440fx-2.10</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <domain type="qemu">
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.12</machine>
      <machine canonical="pc-i440fx-2.12" maxCpus="255">pc</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-i440fx-2.8</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.9</machine>
      <machine maxCpus="255">pc-i440fx-2.6</machine>
      <machine maxCpus="255">pc-i440fx-2.7</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine maxCpus="255">pc-i440fx-2.5</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="288">pc-q35-2.11</machine>
      <machine maxCpus="288">pc-q35-2.12</machine>
      <machine canonical="pc-q35-2.12" maxCpus="288">q35</machine>
      <machine maxCpus="288">pc-q35-2.10</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="288">pc-q35-2.9</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.7</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-i440fx-2.11</machine>
      <machine maxCpus="288">pc-q35-2.8</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine maxCpus="255">pc-q35-2.5</machine>
      <machine maxCpus="255">pc-q35-2.6</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-i440fx-2.10</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <domain type="qemu">
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/qemu-system-x86_64</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:876) Using domain events
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:913) Using network events
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:933) Using storage pool events
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:952) Using node device events
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:831) storage pool refresh event: pool=Images
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (domain:1962) Error setting memstats period: Requested operation is not valid: unable to set balloon driver collection period
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] ERROR (domain:1985) Error reading mem stats: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] ERROR (domain:1936) Error reading disk stats for 'Alpine' dev 'hda': internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (domain:1938) Adding hda to skip list
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] ERROR (domain:1936) Error reading disk stats for 'Alpine' dev 'hdc': internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (domain:1938) Adding hdc to skip list
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:831) storage pool refresh event: pool=default
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:831) storage pool refresh event: pool=LiveISO
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1198) network=default status=Active added
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1198) pool=Images status=Active added
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1198) pool=default status=Active added
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1198) pool=LiveISO status=Active added
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:1198) domain=Alpine status=Running added
[Thu, 16 Aug 2018 00:01:10 virt-manager 9741] DEBUG (connection:602) conn=qemu:///system changed to state=Active
[Thu, 16 Aug 2018 00:01:12 virt-manager 9741] DEBUG (serialcon:37) Using VTE API 2.91
[Thu, 16 Aug 2018 00:01:12 virt-manager 9741] DEBUG (details:646) Showing VM details: <vmmDomain name=Alpine id=0x7f1ee4137190>
[Thu, 16 Aug 2018 00:01:12 virt-manager 9741] DEBUG (engine:405) window counter incremented to 2
[Thu, 16 Aug 2018 00:01:12 virt-manager 9741] DEBUG (console:721) Starting connect process for proto=spice trans= connhost=127.0.0.1 connuser= connport= gaddr=127.0.0.1 gport=5900 gtlsport=None gsocket=None
[Thu, 16 Aug 2018 00:01:12 virt-manager 9741] ERROR (console:740) Error connection to graphical console
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/console.py", line 738, in _init_viewer
    self._viewer.console_open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 247, in console_open
    return self._open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 162, in _open
    fd = self._get_fd_for_open()
  File "/usr/share/virt-manager/virtManager/viewers.py", line 156, in _get_fd_for_open
    return self._vm.open_graphics_fd()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1208, in open_graphics_fd
    return self._backend.openGraphicsFD(0, flags)
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 1884, in openGraphicsFD
    if ret == -1: raise libvirtError ('virDomainOpenGraphicsFD() failed', dom=self)
libvirtError: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'
[Thu, 16 Aug 2018 00:01:13 virt-manager 9741] ERROR (domain:1985) Error reading mem stats: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'
[Thu, 16 Aug 2018 00:01:13 virt-manager 9741] DEBUG (details:682) Closing VM details: <vmmDomain name=Alpine id=0x7f1ee4137190>
[Thu, 16 Aug 2018 00:01:13 virt-manager 9741] DEBUG (engine:409) window counter decremented to 1
[Thu, 16 Aug 2018 00:01:16 virt-manager 9741] ERROR (domain:1985) Error reading mem stats: internal error: failed to parse JSON 1:59: too big integer near '18446744073709551615'

Any ideas what the problem could be?
https://github.com/virt-manager/virt-ma … n.py#L1814

Thank you!

Last edited by dantakka (2018-08-16 12:06:23)

Offline

#2 2018-08-16 04:43:31

stanna
Member
From: melb.au
Registered: 2017-03-24
Posts: 99

Re: [SOLVED] libvirt - internal error: failed to parse JSON

the same thing has just happened to me today with the exact same error message. I was happily working away in my Windows VM when it froze, which id always tends to do from time to time and i got around this by closing the virt-manager window and opening again and away i go.. this time it froze and i closed and went to go back in and i got the same message as you.

sadly i cannot roll back to a previous version of virt-manager to test if the recent update was the cause as i dont have it in my cache but i restarted the computer and its now working again.

but for how long until it freezes again nobody knows..

Last edited by stanna (2018-08-16 05:07:01)

Offline

#3 2018-08-16 06:04:28

Toolybird
Member
Registered: 2017-09-30
Posts: 72

Re: [SOLVED] libvirt - internal error: failed to parse JSON

Upstream libvirt developers decided to switch from yajl to jansson for json parsing. This is reflected in the latest release (4.6.0).

Unfortunately, the libvirt devs have now realised this was a mistake and have reverted back to yajl in the latest git.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

https://www.redhat.com/archives/libvir- … 00633.html

If you're affected, downgrading back to libvirt-4.5.0 is an option, (until 4.7.0 is released - hopefully soon..)

If old package is no longer in your cache, the Arch Archive is handy:

https://wiki.archlinux.org/index.php/Arch_Linux_Archive

Offline

#4 2018-08-16 06:39:58

stanna
Member
From: melb.au
Registered: 2017-03-24
Posts: 99

Re: [SOLVED] libvirt - internal error: failed to parse JSON

Thanks alot ToolyBird, much appreciated!

Offline

#5 2018-08-16 12:18:02

dantakka
Member
Registered: 2018-03-25
Posts: 11

Re: [SOLVED] libvirt - internal error: failed to parse JSON

Toolybird wrote:

Upstream libvirt developers decided to switch from yajl to jansson for json parsing. This is reflected in the latest release (4.6.0).

Unfortunately, the libvirt devs have now realised this was a mistake and have reverted back to yajl in the latest git.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

https://www.redhat.com/archives/libvir- … 00633.html

If you're affected, downgrading back to libvirt-4.5.0 is an option, (until 4.7.0 is released - hopefully soon..)

If old package is no longer in your cache, the Arch Archive is handy:

https://wiki.archlinux.org/index.php/Arch_Linux_Archive

I tried searching for this bug before I posted but nothing showed up. Thank you for clarifying! Apparently this affects only QEMU.
https://libvirt.org/git/?p=libvirt.git; … c873ddb637

Last edited by dantakka (2018-08-16 12:22:14)

Offline

Board footer

Powered by FluxBB