)]}'
{
  "commit": "65207c59d99f2260c5f1d3b9c491146616a522aa",
  "tree": "b88de6508e4e69e305a70285e92d36960065ded0",
  "parents": [
    "b821cbe274c5a5cacf1a7b28360d869ae1e6e0c3"
  ],
  "author": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Thu Mar 05 14:35:26 2015 +0100"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Tue Jun 02 09:59:13 2015 +0200"
  },
  "message": "monitor: Drop broken, unused asynchronous command interface\n\nThe asynchronous monitor command interface goes back to commit 940cc30\n(Jan 2010).  Added a third case to command execution.  The hope back\nthen according to the commit message was that all commands get\nconverted to the asynchronous interface, killing off the other two\ncases.  Didn\u0027t happen.\n\nThe initial asynchronous commands balloon and info balloon were\nconverted back to synchronous long ago (commit 96637bc and d72f32),\nwith commit messages calling the asynchronous interface \"not fully\nworking\" and \"deprecated\".  The only other user went away in commit\n3b5704b.\n\nNew code generally uses synchronous commands and asynchronous events.\n\nWhat exactly is still \"not fully working\" with asynchronous commands?\nWell, here\u0027s a bug that defeats actual asynchronous use pretty\nreliably: the reply\u0027s ID is wrong (and has always been wrong) unless\nyou use the command synchronously!  To reproduce, we need an\nasynchronous command, so we have to go back before commit 3b5704b.\nRun QEMU with spice:\n\n    $ qemu-system-x86_64 -nodefaults -S -spice port\u003d5900,disable-ticketing -qmp stdio\n    {\"QMP\": {\"version\": {\"qemu\": {\"micro\": 94, \"minor\": 2, \"major\": 2}, \"package\": \"\"}, \"capabilities\": []}}\n\nConnect a spice client in another terminal:\n\n    $ remote-viewer spice://localhost:5900\n\nSet up a migration destination dummy in a third terminal:\n\n    $ socat TCP-LISTEN:12345 STDIO\n\nNow paste the following into the QMP monitor:\n\n    { \"execute\": \"qmp_capabilities\", \"id\": \"i0\" }\n    { \"execute\": \"client_migrate_info\", \"id\": \"i1\", \"arguments\": { \"protocol\": \"spice\", \"hostname\": \"localhost\", \"port\": 12345 } }\n    { \"execute\": \"query-kvm\", \"id\": \"i2\" }\n\nProduces two replies immediately, one to qmp_capabilities, and one to\nquery-kvm:\n\n    {\"return\": {}, \"id\": \"i0\"}\n    {\"return\": {\"enabled\": false, \"present\": true}, \"id\": \"i2\"}\n\nBoth are correct.  Two lines of debug output from libspice-server not\nshown.\n\nNow EOF socat\u0027s standard input to make it close the connection.  This\nmakes the asynchronous client_migrate_info complete.  It replies:\n\n    {\"return\": {}}\n\nBug: \"id\": \"i1\" is missing.  Two lines of debug output from\nlibspice-server not shown.  Cherry on top: storage for the missing ID\nis leaked.\n\nGet rid of this stuff before somebody hurts himself with it.\n\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\nReviewed-by: Eric Blake \u003ceblake@redhat.com\u003e\nReviewed-by: Luiz Capitulino \u003clcapitulino@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "df67d56ec08af1f73dfe994d24631bd47dbcca18",
      "old_mode": 33188,
      "old_path": "include/monitor/monitor.h",
      "new_id": "d409b6ac56e905991d241b663d1ebe35888b1cff",
      "new_mode": 33188,
      "new_path": "include/monitor/monitor.h"
    },
    {
      "type": "modify",
      "old_id": "b2561e1e2d28effb80895853e8795969166eeabd",
      "old_mode": 33188,
      "old_path": "monitor.c",
      "new_id": "27efeb6804c9691ce23af80edcedc2aa5c7392c5",
      "new_mode": 33188,
      "new_path": "monitor.c"
    }
  ]
}
