On 11/19/18 8:10 PM, PiBa-NL wrote:
Hi Willy,

Op 19-11-2018 om 4:37 schreef Willy Tarreau:
Hi Pieter,

On Mon, Nov 19, 2018 at 01:07:44AM +0100, PiBa-NL wrote:
Hi List,

I'm trying (and failing?) to write a H2>HTX>H1(keepalive) test.

Using haproxy 1.9-dev6-05b9b64.

Test vtc attached, i added the 'option http-use-htx' to the fe4
frontend/backend.
Is there anything else that should be changed?
For HTX, you need dev7.
Ah crap, i 'thought' i took the latest commit from the online branch. And stopped looking properly.  I must have been a few minutes to soon or something, after i read the dev7 mail.. (and i should have checked i did actually compile the expected version..) (which i totally didn't do in the excitement about htx and the late time..)

Or is my way of making the H2 request incorrect? Though the 3 tests before
it 'seem' to work alright.
I've never tested varnishtest on h2 yet, I don't know precisely how
it's supposed to be configured, nor what minimum version is required
for this. From an haproxy perspective, your config looks OK.

By the way, in my opinion you should remove "option http-keep-alive"
since it's the default
That was a remnant of a previous try to get keep-alive with h2 which then wasn't supposed to work with dev5 yet.
, and I think the config would be more readable
by replacing the "frontend"+"backend" couples with a single "listen"
for each.
Okay true, listen sections would make the config more readable :) . I'm just used to make a frontend+backend for almost 'everything'.. (Usually i have multiple backends behind one frontend anyhow..)  And also i 'think' it shows more clearly in the logging output if it did or didn't get passed from frontend to the backend, but maybe thats just my imagination.

Below the output i get, with a unexpected '500' status, and with a IC-- on
the logline... It also seems it never contacted the s4 server.
Indeed, it faced an internal while trying to make the connection.
What I think happened is that H2 decoded the request (and logged it),
but the upper layer stream failed to do anything from it since it's
configured with HTX and HTX is not supported in your version. Please
note that even with dev7 you don't have H2 over HTX yet. You
definitely need to update to dev7 to eliminate a number of candidate
bugs.

Without the htx option it does make 1 request to the s4, and the second
expected request tries to make a second connection. (the 'old' way..)
Without the latest changes from dev7 it's expecetd since by default,
server-side keep-alive is lost when H2 is used on the frontend (the
connection used to be tied to the stream, so since you have a distinct
stream for each request, you used to lose the connection). In dev7 the
server-side idle connection moved to the session which is attached to
the front connection so the keep-alive will still work.
Okay new try with "1.9-dev7-1611965".
Hoping this helps,
Willy

However that still doesn't work yet (as also already seen by Frederic):

**   c4    0.2 === txreq -req GET -url /3
***  c4    0.2 tx: stream: 1, type: HEADERS (1), flags: 0x05, size: 37
**   c4    0.2 === rxresp
***  h1    0.2 debug|00000007:fe4.accept(000e)=0010 from [::1:13402] ALPN=<none>
**** h1    0.2 STDOUT poll 0x11
***  c4    0.2 HTTP2 rx EOF (fd:6 read: No error: 0)
---- c4    0.2 could not get frame header
**   c4    0.2 Ending stream 1
***  c4    0.2 closing fd 6
**   c4    0.2 Ending
*    top   0.2 RESETTING after ./PB-TEST/h2-keepalive-backend.vtc
**   h1    0.2 Reset and free h1 haproxy 31909
**   h1    0.2 Wait
**   h1    0.2 Stop HAproxy pid=31909
**   h1    0.2 WAIT4 pid=31909 status=0x008b (user 0.013928 sys 0.000000)
*    h1    0.2 Expected exit: 0x0 signal: 0 core: 0
---- h1    0.2 Bad exit status: 0x008b exit 0x0 signal 11 core 128
*    top   0.2 failure during reset
#    top  TEST ./PB-TEST/h2-keepalive-backend.vtc FAILED (0.169) exit=2

Note that, on my side this crash is always reproducible if we use only c4 and s4 (after removing all the other c[1-3] and s[1-3] clients and servers).

Regards,

Fred

Reply via email to