)]}'
{
  "commit": "de8d4c7bddb729d3703c97c6bee58062e154ec34",
  "tree": "0f7ea4eba51a7b723bed5187df53e865065edb53",
  "parents": [
    "a235269feb87e080a80f9a6c1428a52704829a5a"
  ],
  "author": {
    "name": "jmmv",
    "email": "jmmv@google.com",
    "time": "Thu Sep 12 11:12:25 2019 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu Sep 12 11:13:26 2019 -0700"
  },
  "message": "Wait for process termination when the LocalSpawnRunner is interrupted.\n\nThe dynamic scheduler cancels the futures it uses to run spawns, which\ncauses the spawns executed via the LocalSpawnRunner to be interrupted.\nOnce interrupted, the spawn runner kills the subprocess... but it was\nnot waiting for the subprocess\u0027 termination.\n\nThis could lead to races because signal delivery is not synchronous and\nthe subprocess might continue running for a little bit while the dynamic\nscheduler decides to do something else with the other (remote) spawn.\nI haven\u0027t observed these races in the wild, but I\u0027m seeing problems\nwhile modifying the dynamic scheduler to forcibly cancel local spawns\nonce we have scored a cache hit.\n\nTo fix this problem, make the LocalSpawnRunner wait for process termination\nafter it forcibly destroys the subprocess on interrupt. And, while doing\nso, homogenize all (?) the places where we try to forcibly terminate\nsubprocesses.\n\nAddresses issue #7818.\n\nRELNOTES: None.\nPiperOrigin-RevId: 268724818\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f0fe80a0f5de5c647a4bcdae0b15d04db7f8607a",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java",
      "new_id": "dd6d1ecea528e5866035185195bf383f225d0560",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunner.java"
    },
    {
      "type": "modify",
      "old_id": "3bf345a201cb7e3e30f700819532a50986e54db7",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/sandbox/RealSandboxfsProcess.java",
      "new_id": "3f30c71f8ac80a8c129cc0e0ffa4750c0b0132a7",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/sandbox/RealSandboxfsProcess.java"
    },
    {
      "type": "modify",
      "old_id": "f058a9ace93347b60b9880fd5bae5431aef9b2c4",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/shell/Subprocess.java",
      "new_id": "8cb0988321090c415709a40aaf0c8ecb7d894294",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/shell/Subprocess.java"
    },
    {
      "type": "modify",
      "old_id": "e77bb35f3ed2ea882b87f96cf959ff3295c64754",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/worker/Worker.java",
      "new_id": "8c39925f4a5cc618426ffaea0bd37a62bc68852c",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/worker/Worker.java"
    },
    {
      "type": "modify",
      "old_id": "99ba49bda6a7c94bed8616edba2047a450fa6a38",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java",
      "new_id": "d4daedf70dadcb6dbed5be4b09ed34ddb11120d7",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/exec/local/LocalSpawnRunnerTest.java"
    }
  ]
}
