)]}'
{
  "commit": "155c24a16838fbb15e08e0e171361110b1c7656e",
  "tree": "55673052e76b4d5f7002d61ae9b94db0e0f6fa41",
  "parents": [
    "353b22b448cd8611f8e09de790d8e7514bf1cbb1"
  ],
  "author": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Nov 25 22:02:10 2021 +0300"
  },
  "committer": {
    "name": "Maxim Dounin",
    "email": "mdounin@mdounin.ru",
    "time": "Thu Nov 25 22:02:10 2021 +0300"
  },
  "message": "HTTP/2: fixed sendfile() aio handling.\n\nWith sendfile() in threads (\"aio threads; sendfile on;\"), client connection\ncan block on writing, waiting for sendfile() to complete.  In HTTP/2 this\nmight result in the request hang, since an attempt to continue processing\nin thread event handler will call request\u0027s write event handler, which\nis usually stopped by ngx_http_v2_send_chain(): it does nothing if there\nare no additional data and stream-\u003equeued is set.  Further, HTTP/2 resets\nstream\u0027s c-\u003ewrite-\u003eready to 0 if writing blocks, so just fixing\nngx_http_v2_send_chain() is not enough.\n\nCan be reproduced with test suite on Linux with:\n\nTEST_NGINX_GLOBALS_HTTP\u003d\"aio threads; sendfile on;\" prove h2*.t\n\nThe following tests currently fail: h2_keepalive.t, h2_priority.t,\nh2_proxy_max_temp_file_size.t, h2.t, h2_trailers.t.\n\nSimilarly, sendfile() with AIO preloading on FreeBSD can block as well,\nwith similar results.  This is, however, harder to reproduce, especially\non modern FreeBSD systems, since sendfile() usually does not return EBUSY.\n\nFix is to modify ngx_http_v2_send_chain() so it actually tries to send\ndata to the main connection when called, and to make sure that\nc-\u003ewrite-\u003eready is set by the relevant event handlers.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6c93a3bd9e6f0c568ef2ac3281c299953b4fb584",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_copy_filter_module.c",
      "new_id": "b47e4afa750838dd023fb7429256f5f1ab567be8",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_copy_filter_module.c"
    },
    {
      "type": "modify",
      "old_id": "e228493421f4b24639324606d568a3debd15a601",
      "old_mode": 33188,
      "old_path": "src/http/ngx_http_upstream.c",
      "new_id": "ded833c41612a7ba918c3a067f5c70619003d0b1",
      "new_mode": 33188,
      "new_path": "src/http/ngx_http_upstream.c"
    },
    {
      "type": "modify",
      "old_id": "a6e5e7d4f7b1531eca0b71f4f5299c0ad6e6da46",
      "old_mode": 33188,
      "old_path": "src/http/v2/ngx_http_v2_filter_module.c",
      "new_id": "9ffb155dfd16343d7117236ffd8873838759385c",
      "new_mode": 33188,
      "new_path": "src/http/v2/ngx_http_v2_filter_module.c"
    }
  ]
}
