)]}'
{
  "commit": "56fbd8e93bd3438b186cc144a5e529018109f6e1",
  "tree": "a830df0c0b8195e9d26cb386e71d372984962f6f",
  "parents": [
    "e88301d338aaeb6814653a9a9c57e8bb5ee2d49b"
  ],
  "author": {
    "name": "Barret Rhoden",
    "email": "brho@cs.berkeley.edu",
    "time": "Fri Jan 13 17:19:13 2017 -0500"
  },
  "committer": {
    "name": "Barret Rhoden",
    "email": "brho@cs.berkeley.edu",
    "time": "Wed Jan 18 10:00:03 2017 -0500"
  },
  "message": "x86: vmm: Finalize to owning_proc, not cur_proc.\n\nSimilar to a previous bug, x86_finalize_vmtf() assumed the TF belonged to\ncur_proc, but it actually belongs to owning_proc.  If we finalize a TF on a\ncore that runs proc\u0027s/kthreads concurrently, then we could have a situation\nwhere cur_proc !\u003d owning_proc.  Then we\u0027d try finding a GPC for the other\nprocess, instead of the VMM.  Yikes!\n\nThis was relatively easy to make happen regularly: run vmrunkernel as an\nSCP under strace from ssh.  I think I triggered it with perf at some point\ntoo.\n\nHere\u0027s the main debugging info that pointed me the right way:\n\n\tcouldn\u0027t find a gpc, p 284, guest_pcoreid 0\n\n\tkernel panic at kern/arch/x86/vmm/vmm.c:206, from core 0: assertion failed:\n\tgpc\n\tEntering Nanwan\u0027s Dungeon on Core 0 (Ints off):\n\tType \u0027help\u0027 for a list of commands.\n\tROS(Core 0)\u003e ps\n\t     PID Name                 State      Parent\n\t-------------------------------------------------\n\t      15 /bin/cs              WAITING         0\n\t      12 /bin/ipconfig        WAITING         0\n\t       1 bash                 WAITING         0\n\t     269 /bin/dropbear        WAITING         0\n\t     284 strace               RUNNABLE_S    275\n\t     274 /bin/dropbear        WAITING       269\n\t     270 /bin/bash            WAITING         1\n\t     285 vmrunkernel          RUNNING_S     284\n\t     275 -sh                  WAITING       274\n\tROS(Core 0)\u003e bt\n\tStack Backtrace on Core 0:\n\t#01 [\u003c0xffffffffc201ed74\u003e] in mon_backtrace\n\t#02 [\u003c0xffffffffc201fd77\u003e] in monitor\n\t#03 [\u003c0xffffffffc200ca1a\u003e] in _panic\n\t#04 [\u003c0xffffffffc2134e9c\u003e] in unload_guest_pcore\n\t#05 [\u003c0xffffffffc21320d8\u003e] in arch_finalize_ctx\n\t#06 [\u003c0xffffffffc205d1bb\u003e] in copy_current_ctx_to\n\t#07 [\u003c0xffffffffc204d70c\u003e] in __notify\n\t#08 [\u003c0xffffffffc205d71f\u003e] in process_routine_kmsg\n\t#09 [\u003c0xffffffffc2051665\u003e] in proc_restartcore\n\nNote that the lookup was using PID 284 (strace), but the VM was 285.\n\nSigned-off-by: Barret Rhoden \u003cbrho@cs.berkeley.edu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "412df60c65657678d09ecd3f849004cdd27639a6",
      "old_mode": 33188,
      "old_path": "kern/arch/x86/trap.c",
      "new_id": "d21f0b2a81429af71aadbd0951ed02604c5e6991",
      "new_mode": 33188,
      "new_path": "kern/arch/x86/trap.c"
    },
    {
      "type": "modify",
      "old_id": "beb6e1dd45c10633e1db07db9d562351e75ec5bb",
      "old_mode": 33188,
      "old_path": "kern/src/syscall.c",
      "new_id": "5802642144e42f276e2a948521fa480cf128cd27",
      "new_mode": 33188,
      "new_path": "kern/src/syscall.c"
    },
    {
      "type": "modify",
      "old_id": "a9983e4170d33bdcade90fe19ec9c3001acbcd37",
      "old_mode": 33188,
      "old_path": "kern/src/trap.c",
      "new_id": "5e3824d18cec0075e01966c7fa79d60ed5f89e25",
      "new_mode": 33188,
      "new_path": "kern/src/trap.c"
    }
  ]
}
