Hi Patrick,

On Wed, Apr 23, 2014 at 12:17:44PM -0400, Patrick Hemmer wrote:
> >> Yes, I can reliably reproduce the issue. Here's another one with pcaps 
> >> of the eth0 and lo interfaces.

Your pcaps were extremely useful. While I initially failed to reproduce your
issue by breaking connections, I noticed in your pcap that the server response
is truncated and that its early but "clean" close is propagated to the other
side, triggering the detection for a prior client close.

This test was the result of a long standing issue causing people to see some
SD flags in logs while clients were aborting instead.

So I fixed the issue by checking for client close differently (the same way
as in the request path in fact) and all cases are handled correctly for me
now.

I've pushed the fix into the git tree. Here it is if you want to test without
upgrading.

Thanks for this report!
Willy

>From b2c6a786f707d08c92bfd9ea627c38612afca8e0 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <[email protected]>
Date: Wed, 23 Apr 2014 20:29:01 +0200
Subject: BUG/MINOR: http: don't report server aborts as client aborts

Commit f003d37 ("BUG/MINOR: http: don't report client aborts as server errors")
attempted to fix a longstanding issue by which some client aborts could be
logged as server errors. Unfortunately, one of the tests involved there also
catches truncated server responses, which are reported as client aborts.

Instead, only check that the client has really closed using the abortonclose
option, just as in done in the request path (which means that the close was
propagated to the server).

The faulty fix above was introduced in 1.5-dev15, and was backported into
1.4.23.

Thanks to Patrick Hemmer for reporting this issue with traces showing the
root cause of the problem.
---
 src/proto_http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/proto_http.c b/src/proto_http.c
index 1e038f4..5e14d58 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -6357,7 +6357,7 @@ int http_response_forward_body(struct session *s, struct 
channel *res, int an_bi
         * server abort.
         */
        if (res->flags & CF_SHUTR) {
-               if ((res->flags & CF_SHUTW_NOW) || (s->req->flags & CF_SHUTR))
+               if ((s->req->flags & (CF_SHUTR|CF_SHUTW)) == 
(CF_SHUTR|CF_SHUTW))
                        goto aborted_xfer;
                if (!(s->flags & SN_ERR_MASK))
                        s->flags |= SN_ERR_SRVCL;
-- 
1.7.12.1

Reply via email to