Bug 38861

Summary: ApacheBench: write_request returns after EAGAIN
Product: Apache httpd-2 Reporter: Stefan Fleiter <stefan.fleiter>
Component: supportAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal Keywords: FixedInTrunk
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://svn.apache.org/viewcvs.cgi/httpd/httpd/trunk/support/ab.c?rev=349415&view=markup
Attachments: Patch for handling of EAGAIN and totalposted in write_request

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).