)]}'
{
  "commit": "0b62bb66ed17546e4aea6547f8604175ead8f45d",
  "tree": "d252f4a1b6eecca23988ad347a221d5e70262588",
  "parents": [
    "b66afce6ca2b210b50afa98851eb3a722bad2f4d"
  ],
  "author": {
    "name": "Vyacheslav Egorov",
    "email": "vegorov@google.com",
    "time": "Thu Jun 08 13:17:28 2023 +0000"
  },
  "committer": {
    "name": "Commit Queue",
    "email": "dart-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Jun 08 13:17:28 2023 +0000"
  },
  "message": "[vm/io] Make sure to write until EAGAIN on POSIX\n\nWe are using `epoll()` in edge-triggerred mode, which requires\nus to hit `EAGAIN` on `write()` before we are guaranteed\nto receive an `EPOLLOUT` event.\n\n`_SocketStreamConsumer` looks at `_NativeSocket.writeAvailable`\nafter issuing a `write` to decide whether it should continue\nwriting or pause and wait until event handler sends us `writeEvent`.\n\nHowever we did not previously set `writeAvailable` to `true` until\nthe first `writeEvent` arrived, which lead to a hang on some\nLinux servers: we would write a small amount of bytes into a pipe\nand then wait for `writeEvent`, which would never come, as `epoll()`\nis only guaranteed to wake up with `EPOLLOUT` if we hit `EAGAIN`\non `write()`.\n\nThis CL also changes `_NativeSocket.nativeWrite` implementation\nto write bytes into the file descriptor until it gets EAGAIN.\nThis reduces the number of roundtrips between Dart and\nnative.\n\nUnfortunately this CL does not come with a regression test\nbecause it is relying on concrete `epoll()` behaviour and it this\nbehaviour does not reproduce for me.\n\nTEST\u003dTested manually on the affected servers.\n\nFIXED\u003db/286346121\n\nFixed: 286346121\nChange-Id: I37fef9aa12b1da724b035aa9577b414a8057217e\nReviewed-on: https://dart-review.googlesource.com/c/sdk/+/308101\nReviewed-by: Martin Kustermann \u003ckustermann@google.com\u003e\nCommit-Queue: Slava Egorov \u003cvegorov@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6bc051bcdabd55c1bcd20b610b4ae3a0c28c665d",
      "old_mode": 33188,
      "old_path": "runtime/bin/socket_base.cc",
      "new_id": "d1ca099dec741de9b9fee381d20904a6375c44e6",
      "new_mode": 33188,
      "new_path": "runtime/bin/socket_base.cc"
    },
    {
      "type": "modify",
      "old_id": "bbc141ed7ca04f820858467a903eadae2f386f43",
      "old_mode": 33188,
      "old_path": "runtime/bin/socket_base.h",
      "new_id": "702158fd8e4078176775e1ee5de0a1f0ab8e7830",
      "new_mode": 33188,
      "new_path": "runtime/bin/socket_base.h"
    },
    {
      "type": "modify",
      "old_id": "ef9a864885ba5e89ef65d46e789e7e5a9d068e02",
      "old_mode": 33188,
      "old_path": "runtime/bin/socket_base_android.cc",
      "new_id": "c4f48dc82d6a309e37a10bf2a88e17b6ef60ef9f",
      "new_mode": 33188,
      "new_path": "runtime/bin/socket_base_android.cc"
    },
    {
      "type": "modify",
      "old_id": "05535ebea1c904ed691bb8afc085be740c0bb8c9",
      "old_mode": 33188,
      "old_path": "runtime/bin/socket_base_fuchsia.cc",
      "new_id": "f68f367db6514a0c1374169602e18a76ddde0b5b",
      "new_mode": 33188,
      "new_path": "runtime/bin/socket_base_fuchsia.cc"
    },
    {
      "type": "modify",
      "old_id": "db6b83a2ca8f60084969d05fde07c722cfe444c5",
      "old_mode": 33188,
      "old_path": "runtime/bin/socket_base_posix.cc",
      "new_id": "8f2a284de038b594544bbc55ad50a13e3df36a82",
      "new_mode": 33188,
      "new_path": "runtime/bin/socket_base_posix.cc"
    },
    {
      "type": "modify",
      "old_id": "cc5b2af41fd54404110a002906727afaa2d8af75",
      "old_mode": 33188,
      "old_path": "sdk/lib/_internal/vm/bin/socket_patch.dart",
      "new_id": "5e2eff38ea221245f72cdb2918c65f6b36b1e86c",
      "new_mode": 33188,
      "new_path": "sdk/lib/_internal/vm/bin/socket_patch.dart"
    }
  ]
}
