kern/173309: [tcp] TCP connections often prematurely closed by the server side after r242262 [regression]

Fabian Keil freebsd-listen at fabiankeil.de
Sun Nov 4 12:38:02 UTC 2012


Andre Oppermann <andre at freebsd.org> wrote:

> thank you for the bug report.  Please try the attached patch
> which should fix the issue you observed.

Thanks for the patch, Andre.

It seems to make the transfers 100% reliably again,
but they are frequently very slow:

fk at r500 ~ $i=1; while curl -o /dev/zero 'http://127.0.0.1:81/90k-file'; do echo $i; ((i=$i+1)); done
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90000  100 90000    0     0   8670      0  0:00:10  0:00:10 --:--:--  2057
1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90000  100 90000    0     0   8821      0  0:00:10  0:00:10 --:--:--  2057
2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90000  100 90000    0     0   8821      0  0:00:10  0:00:10 --:--:--  2057
3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90000  100 90000    0     0  33.0M      0 --:--:-- --:--:-- --:--:-- 42.9M
4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 90000  100 90000    0     0  32.5M      0 --:--:-- --:--:-- --:--:-- 85.8M

Looks like this is caused by occasional 5 second pauses
between packets after the client's TCP window update:

13:04:40.424942 IP (tos 0x0, ttl 64, id 11449, offset 0, flags [DF], proto TCP (6), length 60)
    127.0.0.1.63441 > 127.0.0.1.81: Flags [S], seq 1083421426, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 2526577688 ecr 0], length 0
13:04:40.425039 IP (tos 0x0, ttl 64, id 11450, offset 0, flags [DF], proto TCP (6), length 60)
    127.0.0.1.81 > 127.0.0.1.63441: Flags [S.], seq 1708634234, ack 1083421427, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 3536938095 ecr 2526577688], length 0
13:04:40.425090 IP (tos 0x0, ttl 64, id 11451, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.63441 > 127.0.0.1.81: Flags [.], seq 1, ack 1, win 1275, options [nop,nop,TS val 2526577688 ecr 3536938095], length 0
13:04:40.425984 IP (tos 0x0, ttl 64, id 11452, offset 0, flags [DF], proto TCP (6), length 205)
    127.0.0.1.63441 > 127.0.0.1.81: Flags [P.], seq 1:154, ack 1, win 1275, options [nop,nop,TS val 2526577689 ecr 3536938095], length 153
13:04:40.426320 IP (tos 0x0, ttl 64, id 11453, offset 0, flags [DF], proto TCP (6), length 16384)
    127.0.0.1.81 > 127.0.0.1.63441: Flags [.], seq 1:16333, ack 154, win 1275, options [nop,nop,TS val 3536938096 ecr 2526577689], length 16332
[...]
13:04:40.447030 IP (tos 0x0, ttl 64, id 11473, offset 0, flags [DF], proto TCP (6), length 16384)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 1:16333, ack 154, win 1275, options [nop,nop,TS val 831837815 ecr 2625389072], length 16332
13:04:40.447110 IP (tos 0x0, ttl 64, id 11474, offset 0, flags [DF], proto TCP (6), length 16384)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 16333:32665, ack 154, win 1275, options [nop,nop,TS val 831837815 ecr 2625389072], length 16332
13:04:40.447152 IP (tos 0x0, ttl 64, id 11475, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 154, ack 32665, win 897, options [nop,nop,TS val 2625389073 ecr 831837815], length 0
13:04:40.447222 IP (tos 0x0, ttl 64, id 11476, offset 0, flags [DF], proto TCP (6), length 16384)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [P.], seq 32665:48997, ack 154, win 1275, options [nop,nop,TS val 831837815 ecr 2625389073], length 16332
13:04:40.447271 IP (tos 0x0, ttl 64, id 11477, offset 0, flags [DF], proto TCP (6), length 16384)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 48997:65329, ack 154, win 1275, options [nop,nop,TS val 831837815 ecr 2625389073], length 16332
13:04:40.447333 IP (tos 0x0, ttl 64, id 11478, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 154, ack 65329, win 511, options [nop,nop,TS val 2625389074 ecr 831837815], length 0
13:04:40.447597 IP (tos 0x0, ttl 64, id 11479, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 154, ack 65329, win 1023, options [nop,nop,TS val 2625389074 ecr 831837815], length 0
13:04:45.447389 IP (tos 0x0, ttl 64, id 11481, offset 0, flags [DF], proto TCP (6), length 16324)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 65329:81601, ack 154, win 1275, options [nop,nop,TS val 831842816 ecr 2625389074], length 16272
13:04:45.547335 IP (tos 0x0, ttl 64, id 11482, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 154, ack 81601, win 1275, options [nop,nop,TS val 2625394174 ecr 831842816], length 0
13:04:50.547368 IP (tos 0x0, ttl 64, id 11483, offset 0, flags [DF], proto TCP (6), length 53)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 81601:81602, ack 154, win 1275, options [nop,nop,TS val 831847916 ecr 2625394174], length 1
13:04:50.647331 IP (tos 0x0, ttl 64, id 11484, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 154, ack 81602, win 1275, options [nop,nop,TS val 2625399274 ecr 831847916], length 0
13:04:50.647389 IP (tos 0x0, ttl 64, id 11485, offset 0, flags [DF], proto TCP (6), length 8691)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [P.], seq 81602:90241, ack 154, win 1275, options [nop,nop,TS val 831848016 ecr 2625399274], length 8639
13:04:50.647859 IP (tos 0x0, ttl 64, id 11486, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [F.], seq 154, ack 90241, win 1275, options [nop,nop,TS val 2625399274 ecr 831848016], length 0
13:04:50.647916 IP (tos 0x0, ttl 64, id 11487, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [.], seq 90241, ack 155, win 1275, options [nop,nop,TS val 831848016 ecr 2625399274], length 0
13:04:50.648018 IP (tos 0x0, ttl 64, id 11488, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.81 > 127.0.0.1.58989: Flags [F.], seq 90241, ack 155, win 1275, options [nop,nop,TS val 831848016 ecr 2625399274], length 0
13:04:50.648078 IP (tos 0x0, ttl 64, id 11489, offset 0, flags [DF], proto TCP (6), length 52)
    127.0.0.1.58989 > 127.0.0.1.81: Flags [.], seq 155, ack 90242, win 1275, options [nop,nop,TS val 2625399274 ecr 831848016], length 0

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20121104/d13fcd69/attachment.sig>


More information about the freebsd-net mailing list