Ticket #1675 (closed defect: fixed)

Opened 3 months ago

Last modified 5 weeks ago

network_freebsd_sendfile does not handle EAGAIN or EINTR on file chunks (patch)

Reported by: petopeto Owned by: jan
Priority: normal Milestone: 1.5.0
Component: core Version: 1.4.19
Severity: normal Keywords:
Cc: petopeto@… Blocked By:
Need User Feedback: no Blocking:

Description

If a single call is writing a memory chunk followed by a file chunk, the memory chunk may fill the kernel buffer, and the file chunk's sendfile() will return EAGAIN. If no data was written from the chunk at all, the "r == 0" case would return with -2. Work around by disabling the "r == 0" case for non-fatal sendfile() errors.

This was causing pages to not display images randomly. It wouldn't show up as an error in FF, because the headers in the memory chunk would be received, and it would see the image as a 0-byte successful file.

Also, EINTR is not handled. If the writev case needs this, the sendfile one probably does, too.

Attachments

network_freebsd_sendfile.diff (0.6 kB) - added by petopeto 3 months ago.

Change History

Changed 3 months ago by petopeto

Changed 5 weeks ago by stbuehler

  • status changed from new to closed
  • resolution set to fixed

Fixed in [2256]

Add/Change #1675 (network_freebsd_sendfile does not handle EAGAIN or EINTR on file chunks (patch))

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.