Bug 38861 - ApacheBench: write_request returns after EAGAIN
Summary: ApacheBench: write_request returns after EAGAIN
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: support (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://svn.apache.org/viewcvs.cgi/htt...
Keywords: FixedInTrunk
Depends on:
Reported: 2006-03-06 09:47 UTC by Stefan Fleiter
Modified: 2008-05-27 15:15 UTC (History)
0 users

Patch for handling of EAGAIN and totalposted in write_request (676 bytes, patch)
2006-03-06 09:51 UTC, Stefan Fleiter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Fleiter 2006-03-06 09:47:10 UTC
write_request of ab.c returns on EAGAIN so writing of data is never finished.
This can be easily reproduced by sending large post requests to a server.

The calculation of totalposted is incorrect, the to be written bytes are added
(c->rwrite) instead of the written (c->rwrote).

The attached patch fixes the EAGAIN case und makes calculation of totalposted
correct, even in the case of send failures.

Thanks a lot for an otherwise great beanchmarking tool.
Comment 1 Stefan Fleiter 2006-03-06 09:51:16 UTC
Created attachment 17839 [details]
Patch for handling of EAGAIN and totalposted in write_request
Comment 2 Roy T. Fielding 2008-05-12 13:58:03 UTC
Fixed in trunk (r655637).
Duplicate of bug 10038.
Comment 3 Ruediger Pluem 2008-05-27 15:15:12 UTC
Backported to 2.2.x as r660576 (http://svn.apache.org/viewvc?rev=660576&view=rev).