Project

General

Profile

Actions

Bug #2368

closed

sendfile(2) freezes for a few seconds

Added by ftigeot almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/16/2012
Due date:
% Done:

100%

Estimated time:

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


Files

tcpdump-sendfile.txt (3.88 KB) tcpdump-sendfile.txt ftigeot, 05/16/2012 11:50 PM
Actions #1

Updated by sepherosa almost 12 years ago

On Thu, May 17, 2012 at 3:07 AM, Francois Tigeot via Redmine
<> 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

Actions #2

Updated by ftigeot almost 12 years ago

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.

Actions #3

Updated by ftigeot almost 12 years 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.

Actions #4

Updated by sepherosa almost 12 years ago

On Thu, May 17, 2012 at 5:50 PM, Francois Tigeot via Redmine
<> 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

Actions #5

Updated by ftigeot almost 12 years 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

Actions

Also available in: Atom PDF