On Fri, Dec 29, 2017 at 11:45:55AM +0100, Lukas Tribus wrote:
> The FIN behavior comes from a48c141f4 ("BUG/MAJOR: connection: refine
> the situations where we don't send shutw()"), which also hit 1.8.2, so
> that explains the change in behavior between 1.8.1 and 1.8.2.

For me it happens only when I have "option httpclose" in the configuration,
ie we end up in tunnel mode. I can't reproduce it with either keep-alive,
http-server-close nor forceclose. At least abortonclose is now safe
regarding this. Does this match your observations as well ?

At least in this case it makes sense (even if not recommended) as the
httpclose mode ends up in tunnel mode and must forward the shutdown. If
it's the case, we can possibly document that httpclose should not be
used. But with H1 it rarely causes trouble, so I'm a bit hesitant about
what to do with it in H2 :-/

Here's the trace :

14:23:39.621361 sendto(15, "POST /s2 HTTP/1.1\r\nuser-agent: 
curl/7.54.1\r\naccept: */*\r\ncontent-length: 10\r\ncontent-type: 
application/x-www-form-urlencoded\r\nhost: 127.0.0.1:4443\r\nX-Forwarded-For: 
127.0.0.1\r\nConnection: close\r\n\r\nrob"..., 207, MSG_DONTWAIT|MSG_NOSIGNAL, 
NULL, 0) = 207
14:23:39.621467 shutdown(15, 1 /* send */) = 0
14:23:39.621531 epoll_wait(3, {}, 200, 0) = 0
14:23:39.621575 recvfrom(15, 0xacd164, 15354, 0, 0, 0) = -1 EAGAIN (Resource 
temporarily unavailable)
14:23:39.621617 epoll_ctl(3, EPOLL_CTL_ADD, 15, {EPOLLIN|0x2000, {u32=15, 
u64=15}}) = 0
14:23:39.621655 epoll_wait(3, {{EPOLLIN, {u32=14, u64=14}}}, 200, 1000) = 1
14:23:39.621695 read(14, "\27\3\3\0!", 5) = 5
14:23:39.621732 read(14, 
"\353&6\37b8\227\220\360\237\314?\255\353\253\324\244\210$1\366j\323Z7`\236\331\370N\357\10#",
 33) = 33
14:23:39.621779 read(14, 0xb17b83, 5)   = -1 EAGAIN (Resource temporarily 
unavailable)
14:23:39.621812 epoll_wait(3, {{EPOLLIN, {u32=15, u64=15}}}, 200, 1000) = 1
14:23:39.621955 recvfrom(15, "HTTP/1.1 200 OK\r\nContent-length: 
5\r\n\r\nazert", 15354, 0, NULL, NULL) = 43
14:23:39.622122 recvfrom(15, "", 15311, 0, NULL, NULL) = 0
14:23:39.622164 close(15)               = 0

Willy

Reply via email to