)]}'
{
  "commit": "353b22b448cd8611f8e09de790d8e7514bf1cbb1",
  "tree": "b7981c366e436e5a110d414e150f22f5750cfeac",
  "parents": [
    "5458465d33ba39800289b27d002e103f2be4de9c"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Nov 25 22:02:05 2021 +0300"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Nov 25 22:02:05 2021 +0300"
  },
  "message": "HTTP/2: fixed \"task already active\" with sendfile in threads.\n\nWith sendfile in threads, \"task already active\" alerts might appear in logs\nif a write event happens on the main HTTP/2 connection, triggering a sendfile\nin threads while another thread operation is already running.  Observed\nwith \"aio threads; aio_write on; sendfile on;\" and with thread event handlers\nmodified to post a write event to the main HTTP/2 connection (though can\nhappen without any modifications).\n\nSimilarly, sendfile() with AIO preloading on FreeBSD can trigger duplicate\naio operation, resulting in \"second aio post\" alerts.  This is, however,\nharder to reproduce, especially on modern FreeBSD systems, since sendfile()\nusually does not return EBUSY.\n\nFix is to avoid starting a sendfile operation if other thread operation\nis active by checking r-\u003eaio in the thread handler (and, similarly, in\naio preload handler).  The added check also makes duplicate calls protection\nredundant, so it is removed.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c8ad5daeea5aff5ef6dbd1497739a1f873c1e219",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_copy_filter_module.c",
      "new_id": "6c93a3bd9e6f0c568ef2ac3281c299953b4fb584",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_copy_filter_module.c"
    },
    {
      "type": "modify",
      "old_id": "002b3e65daaa343d347a59ac1707b315437472c0",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_upstream.c",
      "new_id": "e228493421f4b24639324606d568a3debd15a601",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_upstream.c"
    },
    {
      "type": "modify",
      "old_id": "3d415bd2cf27ad831e01378e1bbfd7f8a13e6cde",
      "old_mode": 33188,
      "old_path": "src/os/unix/ngx_freebsd_sendfile_chain.c",
      "new_id": "750c12fc3538306c896ac16de8ffb8fbc13b794b",
      "new_mode": 33188,
      "new_path": "src/os/unix/ngx_freebsd_sendfile_chain.c"
    },
    {
      "type": "modify",
      "old_id": "91e7f1d9317945243fd55ddb43a4a375cd621012",
      "old_mode": 33188,
      "old_path": "src/os/unix/ngx_linux_sendfile_chain.c",
      "new_id": "101d91a9a813cee70f0b906b45b18856bb1c062b",
      "new_mode": 33188,
      "new_path": "src/os/unix/ngx_linux_sendfile_chain.c"
    }
  ]
}
