HAProxy community

Some Spoe streams fails intermittently with st=258

Hi all,

I’m using haproxy:latest image in a Docker Desktop for windows.
I’m developping a Spoa engine and sometimes Haproxy didn’t succeed in sending a frame but following one are ok.

the spoe backend is configured with
timeout server 20s
timeout connect 10s
server agent1 spoehostname:12345 maxconn 1
and in the spoe.conf
timeout hello 5s
timeout idle 10s
timeout processing 10s
spoe capabilities are fragmentation (but all frames are way smaller than max frame size and pipelining.

I configured for only one connection and expect haproxy to serialize streams. From the first stream to the last one, only one connection is opened and handshake is ok. I then make successive calls.
I guess some are concurrents and haproxy tries to send on another connection. It can not do so as no unused connection slots are available and the stream seems to timeout on the hello timeout while it should have been serialized on the open connection when available to write.

<29>May 25 14:13:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=0 st=0 0/88/16/0/105 1/1 0/0 0/1
<29>May 25 14:13:25 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=2 st=0 0/36/22/0/58 1/1 0/0 0/2
<29>May 25 14:13:35 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=4 st=0 0/6/0/0/7 1/1 0/0 0/3
<29>May 25 14:13:36 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=6 st=0 0/0/1/0/1 1/2 0/0 0/4
<29>May 25 14:13:37 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=8 st=0 0/0/1/0/1 1/3 0/0 0/5
<29>May 25 14:13:37 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=10 st=0 0/0/1/0/2 1/4 0/0 0/6
...
[truncated for brievty]
...
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=88 st=0 0/0/0/0/0 1/6 0/0 0/67
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=89 st=0 0/0/0/0/0 1/6 0/0 0/68
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=90 st=0 0/0/0/0/0 1/7 1/0 0/69
...
[stream 91 didn't complete and will fail later]
...
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=93 st=0 0/0/0/0/0 1/7 1/0 0/70
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=94 st=0 0/0/1/0/1 1/7 1/0 0/71
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=95 st=0 0/0/0/0/0 1/7 1/0 0/72
<29>May 25 14:14:09 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=96 st=0 0/0/0/0/0 1/7 1/0 0/73
...
[truncated for brievty]
...
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=215 st=0 0/0/0/0/0 1/2 1/0 0/191
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=216 st=0 0/0/0/0/0 1/2 1/0 0/192
[here the 91 failure, same thing happens for 218]
<28>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=91 st=258 0/5000/-1/-1/5000 1/1 0/0 1/193
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=217 st=0 0/0/0/0/1 1/2 1/0 1/194
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=220 st=0 0/0/0/0/0 1/2 1/0 1/195
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=221 st=0 0/0/0/0/0 1/2 1/0 1/196
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=222 st=0 0/0/0/0/0 1/2 1/0 1/197
<29>May 25 14:14:14 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=223 st=0 0/0/0/0/0 1/2 1/0 1/198
...
[truncated for brievty]
...
<29>May 25 14:14:17 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=298 st=0 0/0/0/0/0 1/2 1/0 1/273
<29>May 25 14:14:17 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=299 st=0 0/0/0/0/0 1/2 1/0 1/274
[all pending stream are completed before the hanging one timeout, so the connection should have been made available to it]
<28>May 25 14:14:19 haproxy[6]: SPOE: [dotnetcore] <GROUP:g-challenge-request> sid=218 st=258 0/5000/-1/-1/5000 1/1 0/0 2/275