I’ve done a little digging to see if I can show that there’s a buffering issue or not. I have one BP client that is very prone to whatever this problem is. So I ran tcpdump on both ends of the tunnel. On the client I watched all packets going to or from the lo interface, and on the server I watched all packets going to or from the random port allocated to this tunnel. And what I saw, detailed below, is the client sending 137 bytes into the tunnel every 10 to 20 seconds, and the server end receiving 4,127 bytes every 8 minutes or so. The number 137 and 4,127 were consistent over the hour or so I was watching this.
Here’s what the server saw. I’ve cut lots of lines out because they are virtually identical, and have included two examples where it received 4,127 bytes.
21:30:51.669974 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1838887825 ecr 1838449798], length 0
21:31:06.773981 IP localhost.52668 > localhost.33689: Flags [.], ack 1, win 512, options [nop,nop,TS val 1838902929 ecr 1838887825], length 0
21:31:06.774087 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1838902929 ecr 1838449798], length 0
21:31:18.604007 IP localhost.33689 > localhost.52668: Flags [P.], seq 1:4128, ack 1, win 512, options [nop,nop,TS val 1838914759 ecr 1838449798], length 4127
21:31:18.604033 IP localhost.52668 > localhost.33689: Flags [.], ack 4128, win 491, options [nop,nop,TS val 1838914759 ecr 1838914759], length 0
21:31:33.653909 IP localhost.52668 > localhost.33689: Flags [.], ack 4128, win 512, options [nop,nop,TS val 1838929809 ecr 1838914759], length 0
21:31:33.653971 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1838929809 ecr 1838914759], length 0
---
21:38:36.566137 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1839352721 ecr 1838914759], length 0
21:38:51.669887 IP localhost.52668 > localhost.33689: Flags [.], ack 4128, win 512, options [nop,nop,TS val 1839367824 ecr 1839352721], length 0
21:38:51.669932 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1839367825 ecr 1838914759], length 0
21:39:00.578433 IP localhost.33689 > localhost.52668: Flags [P.], seq 4128:8255, ack 1, win 512, options [nop,nop,TS val 1839376733 ecr 1838914759], length 4127
21:39:00.578467 IP localhost.52668 > localhost.33689: Flags [.], ack 8255, win 491, options [nop,nop,TS val 1839376733 ecr 1839376733], length 0
21:39:15.733960 IP localhost.52668 > localhost.33689: Flags [.], ack 8255, win 512, options [nop,nop,TS val 1839391889 ecr 1839376733], length 0
21:39:15.734096 IP localhost.33689 > localhost.52668: Flags [.], ack 1, win 512, options [nop,nop,TS val 1839391889 ecr 1839376733], length 0
Here’s the tcpdump from the client at the same time as the 4,127 bytes on the server.
21:30:48.521112 IP localhost.34046 > localhost.81: Flags [.], ack 3288, win 1014, options [nop,nop,TS val 3049409429 ecr 3049409429], length 0
21:31:00.499564 IP localhost.81 > localhost.34046: Flags [P.], seq 3288:3425, ack 1, win 1024, options [nop,nop,TS val 3049421407 ecr 3049409429], length 137
21:31:00.499749 IP localhost.34046 > localhost.81: Flags [.], ack 3425, win 1014, options [nop,nop,TS val 3049421407 ecr 3049421407], length 0
21:31:18.521390 IP localhost.81 > localhost.34046: Flags [P.], seq 3425:3562, ack 1, win 1024, options [nop,nop,TS val 3049439429 ecr 3049421407], length 137
21:31:18.521564 IP localhost.34046 > localhost.81: Flags [.], ack 3562, win 1014, options [nop,nop,TS val 3049439429 ecr 3049439429], length 0
21:31:33.520933 IP localhost.81 > localhost.34046: Flags [P.], seq 3562:3699, ack 1, win 1024, options [nop,nop,TS val 3049454429 ecr 3049439429], length 137
21:31:33.521114 IP localhost.34046 > localhost.81: Flags [.], ack 3699, win 1014, options [nop,nop,TS val 3049454429 ecr 3049454429], length 0
21:31:48.520666 IP localhost.81 > localhost.34046: Flags [P.], seq 3699:3836, ack 1, win 1024, options [nop,nop,TS val 3049469428 ecr 3049454429], length 137
---
21:38:33.526327 IP localhost.34046 > localhost.81: Flags [.], ack 7535, win 1014, options [nop,nop,TS val 3049874434 ecr 3049874434], length 0
21:38:48.526355 IP localhost.81 > localhost.34046: Flags [P.], seq 7535:7672, ack 1, win 1024, options [nop,nop,TS val 3049889434 ecr 3049874434], length 137
21:38:48.526532 IP localhost.34046 > localhost.81: Flags [.], ack 7672, win 1014, options [nop,nop,TS val 3049889434 ecr 3049889434], length 0
21:39:00.501535 IP localhost.81 > localhost.34046: Flags [P.], seq 7672:7809, ack 1, win 1024, options [nop,nop,TS val 3049901409 ecr 3049889434], length 137
21:39:00.501724 IP localhost.34046 > localhost.81: Flags [.], ack 7809, win 1014, options [nop,nop,TS val 3049901409 ecr 3049901409], length 0
21:39:18.526281 IP localhost.81 > localhost.34046: Flags [P.], seq 7809:7946, ack 1, win 1024, options [nop,nop,TS val 3049919434 ecr 3049901409], length 137
21:39:18.526457 IP localhost.34046 > localhost.81: Flags [.], ack 7946, win 1014, options [nop,nop,TS val 3049919434 ecr 3049919434], length 0
21:39:33.525958 IP localhost.81 > localhost.34046: Flags [P.], seq 7946:8083, ack 1, win 1024, options [nop,nop,TS val 3049934434 ecr 3049919434], length 137
The client doesn’t see anything different at the time when the server receives the 4,127 bytes. The client just continues sending its 137 byte packets.
I do notice that the client has the PUSH flag set on all its 137 byte packets. So, maybe, something is not honoring this flag.