https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412022-08-04T15:30:25Zlighty labsLighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133022022-08-04T15:30:25Zgstrauss
<ul></ul><p>This optimization will be part of the next lighttpd release (lighttpd 1.4.66). Does it help?<br /><a class="external" href="https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/f86b448799fc7f55274a1d61583ff3d390f58e0b">https://git.lighttpd.net/lighttpd/lighttpd1.4/commit/f86b448799fc7f55274a1d61583ff3d390f58e0b</a></p>
<p>Also, please check that you are running curl 7.84 or later. (See <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Slow upload / Increase CPU/Memory usage with HTTP/2 enabled (Fixed)" href="https://redmine.lighttpd.net/issues/3089">#3089</a>)</p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133032022-08-04T16:03:38Zflynn
<ul></ul><p>The used curl version is 7.84.0.<br />The problem is also reproducable with firefox browser on Linux and Windows.<br />Both clients hang after 10% downloaded filesize.</p>
<p>Chromium has the same problem, so it is not an issue of a single client.</p>
<p>I applied the patch above to version 1.4.65, the problem remains: curl hangs at the exact same position.</p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133042022-08-04T16:10:25Zflynn
<ul></ul><p>I enabled <code>debug.log-state-handling = "enable"</code>, it just stops writing log messages:</p>
<pre>
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
2022-08-04 18:08:12: (connections.c.958) fd:7 id:1 state:write
</pre> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133052022-08-04T16:16:04Zgstrauss
<ul></ul><p>I see similar behavior, but have not tracked down the issue yet.</p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133062022-08-04T20:46:44Zgstrauss
<ul></ul><p>I have not had much time to dig into this, but will do so later today.</p>
<p>The issue appears at exactly 4 GiB in size. Things work with one byte fewer.<br />This suggests to me that there is a uint32_t calculation somewhere which should be off_t.</p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133072022-08-05T02:45:43Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li></ul><p>Thanks for the bug report. This looks to be a regression since lighttpd 1.4.60. Here is a patch. <br /><pre>
--- a/src/h2.c
+++ b/src/h2.c
@@ -2636,8 +2636,8 @@ h2_send_cqdata (request_st * const r, connection * const con, chunkqueue * const
if (h2r->h2_swin < 0) return 0;
if ((int32_t)dlen > r->h2_swin) dlen = (uint32_t)r->h2_swin;
if ((int32_t)dlen > h2r->h2_swin) dlen = (uint32_t)h2r->h2_swin;
- const uint32_t cqlen = (uint32_t)chunkqueue_length(cq);
- if (dlen > cqlen) dlen = cqlen;
+ const off_t cqlen = chunkqueue_length(cq);
+ if ((int32_t)dlen > cqlen) dlen = (uint32_t)cqlen;
/*(note: must temporarily disable next line when running h2spec since
* some h2spec tests expect 1-byte DATA frame, not a deferred response)*/
else if (dlen < 2048 && cqlen >= 2048) return 0;
</pre></p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133082022-08-05T02:50:05Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li></ul><p>Applied in changeset <a class="changeset" title="[core] fix HTTP/2 downloads >= 4GiB (fixes #3166) (thx flynn) regression in lighttpd 1.4.60 - l..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/dedf17b44a13960e8fc32bb1e24fd707a7559bc2">dedf17b44a13960e8fc32bb1e24fd707a7559bc2</a>.</p> Lighttpd - Bug #3166: GET requests hangs on big files after 10% using HTTP/2https://redmine.lighttpd.net/issues/3166?journal_id=133092022-08-05T07:56:01Zflynn
<ul></ul><p>Tested and works - thank you.</p>