Bug #2368
sendfile(2) freezes for a few seconds
| Status: | Closed | Start date: | 05/16/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | - | |||
| Target version: | - |
Description
Having updated a web server to apache-2.4 (sendfile enabled), I noticed
some static images didn't load in one go:
- top parts are displayed instantly
- image downloads freeze for a few seconds
- missing bottom parts are then downloaded and displayed instantly
Switching EnableSendfile between on/off in httpd.conf enables or disables
this behavior 100% of the time
Related todos
History
Updated by sepherosa about 1 year ago
On Thu, May 17, 2012 at 3:07 AM, Francois Tigeot via Redmine
<bugtracker-admin@leaf.dragonflybsd.org> wrote:
>
> Issue #2368 has been reported by Francois Tigeot.
>
> ----------------------------------------
> Bug #2368: sendfile(2) freezes for a few seconds
> http://bugs.dragonflybsd.org/issues/2368
>
> Author: Francois Tigeot
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> Having updated a web server to apache-2.4 (sendfile enabled), I noticed
> some static images didn't load in one go:
>
> - top parts are displayed instantly
> - image downloads freeze for a few seconds
> - missing bottom parts are then downloaded and displayed instantly
>
> Switching EnableSendfile between on/off in httpd.conf enables or disables
> this behavior 100% of the time
Possible to get a tcpdump (w/ -s 128 should be ok)?
Best Regards,
sephe
--
Tomorrow Will Never Die
Updated by ftigeot about 1 year ago
- File tcpdump-sendfile.txt added
I've reproduced the issue with a single file (the DragonFly logo).
Complete URL is http://dl.wolfpond.org/small_logo.png
Trace attached.
Now that I'm always using the same image, I've noticed the download systematically freezes in the same place, at about 90% of the height.
Updated by ftigeot about 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
This bug is caused by the use of TCP_NOPUSH in association with sendfile(2) in the Apache-2.4 code.
Thanks for Sepherosa Ziehau for pointing it.
Bug reports will be filled with pkgsrc and the upstream project.
Updated by sepherosa about 1 year ago
On Thu, May 17, 2012 at 5:50 PM, Francois Tigeot via Redmine
<bugtracker-admin@leaf.dragonflybsd.org> wrote:
>
> Issue #2368 has been updated by Francois Tigeot.
>
> Status changed from New to Closed
> % Done changed from 0 to 100
>
> This bug is caused by the use of TCP_NOPUSH in association with sendfile(2) in the Apache-2.4 code.
Please test unpatched apache-2.4 w/ the following commit.
3533a1834a0ba3a7c441ede5120c3720d8a34c4c
Best Regards,
sephe
>
> Thanks for Sepherosa Ziehau for pointing it.
>
> Bug reports will be filled with pkgsrc and the upstream project.
> ----------------------------------------
> Bug #2368: sendfile(2) freezes for a few seconds
> http://bugs.dragonflybsd.org/issues/2368
>
> Author: Francois Tigeot
> Status: Closed
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> Having updated a web server to apache-2.4 (sendfile enabled), I noticed
> some static images didn't load in one go:
>
> - top parts are displayed instantly
> - image downloads freeze for a few seconds
> - missing bottom parts are then downloaded and displayed instantly
>
> Switching EnableSendfile between on/off in httpd.conf enables or disables
> this behavior 100% of the time
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
--
Tomorrow Will Never Die
Updated by ftigeot about 1 year ago
Stock apache-2.4 works fine with the last commit.
Apache bug report:
https://issues.apache.org/bugzilla/show_bug.cgi?id=53253
Pkgsrc problem report:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46458