Re: Howto reset and reuse a socket (not having a 7.80 sec delay)
From: Troels Smit (troels_smit_at_hotmail.com)
Date: 06/09/05
- Next message: Andrei Voropaev: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Previous message: Paul Pluzhnikov: "Re: Suspicious _init() in core dump"
- In reply to: David Schwartz: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Next in thread: Andrei Voropaev: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Jun 2005 01:17:03 -0700
"David Schwartz" <davids@webmaster.com> wrote in message news:<d86n2k$nr1$1@nntp.webmaster.com>...
> "Troels Smit" <troels_smit@hotmail.com> wrote in message
> news:316d5fc0.0506080347.56b4a7e1@posting.google.com...
>
> > Now, if the client IS transmitting when I reset it, the server will
> > receive a "Connection reset by peer" and close the connection. When
> > the client then re-connects exactly 7.80 seconds!! will pass before
> > data starts to flow. The connections is accepted (so the new
> > connection is immidiately seen by the server) but the second packet
> > will not be received at the server, before 7.80 seconds has passed,
> > then everything again runs in a smooth manner.
>
> What is the server doing during those 7.8 seconds?
>
> DS
In the 7.8 seconds the server is simply waiting for data to arrive.
The "Connection reset by peer" will first arrive at the server when
the client tries to reconnect. I guess this causes the server to be
confused - but which timeout is used to resolve this ?
This is the tcpdump from the reconnect - client is rtemsaud2, server
is 10.0.0.3, rockwell-csp2 is a bad translation of using port 2222 for
my communication. What I see is:
1. Client is looking up server
2. Some weird messages
3. The connect
4. RPC communication
5. THE PAUSE
6. Data communication
15:16:44.228283 arp who-has rtemsaud2 tell rtemsaud2
15:16:44.263225 arp who-has 10.0.0.3 tell rtemsaud2
15:16:44.263230 arp reply 10.0.0.3 is-at 00:13:20:17:3c:26
15:16:44.263615 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: S
9999100:9999100(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp
0 0,nop,nop,ccnew 2>
15:16:44.263623 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack
12692105 win 8688 <nop,nop,timestamp 452436387 74>
15:16:44.264070 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: R
12692105:12692105(0) win 16384
15:16:44.264148 IP 10.0.0.3.59886 > rtemsaud2.15376: R
2712471351:2712471351(0) ack 10441754 win 1460 <nop,nop,timestamp
452436388 6>
15:16:47.216555 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: S
9999100:9999100(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp
5 0,nop,nop,ccnew 2>
15:16:47.216577 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: S
2772968017:2772968017(0) ack 9999101 win 5792 <mss
1460,nop,nop,timestamp 452439341 5,nop,wscale 2>
15:16:47.217124 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: . ack 1
win 17376 <nop,nop,timestamp 6 452439341>
15:16:47.217266 IP 10.0.0.3.56366 > rtemsaud2.15376: S
2771979119:2771979119(0) win 5840 <mss 1460,sackOK,timestamp 452439341
0,nop,wscale 2>
15:16:47.217962 IP rtemsaud2.15376 > 10.0.0.3.56366: S
10441721:10441721(0) ack 2771979120 win 17376 <mss 1460,nop,wscale
0,nop,nop,timestamp 6 452439341>
15:16:47.217971 IP 10.0.0.3.56366 > rtemsaud2.15376: . ack 1 win 1460
<nop,nop,timestamp 452439342 6>
15:16:47.218020 IP 10.0.0.3.56366 > rtemsaud2.15376: P 1:45(44) ack 1
win 1460 <nop,nop,timestamp 452439342 6>
15:16:47.419072 IP 10.0.0.3.56366 > rtemsaud2.15376: P 1:45(44) ack 1
win 1460 <nop,nop,timestamp 452439543 6>
15:16:47.419694 IP rtemsaud2.15376 > 10.0.0.3.56366: . ack 45 win
17332 <nop,nop,timestamp 6 452439342>
15:16:47.425796 IP rtemsaud2.15376 > 10.0.0.3.56366: P 1:33(32) ack 45
win 17376 <nop,nop,timestamp 6 452439342>
15:16:47.425804 IP 10.0.0.3.56366 > rtemsaud2.15376: . ack 33 win 1460
<nop,nop,timestamp 452439550 6>
15:16:55.249901 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
1:1449(1448) ack 1 win 17376 <nop,nop,timestamp 21 452439341>
15:16:55.249916 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 1449
win 2172 <nop,nop,timestamp 452447375 21>
15:16:55.251311 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
1449:2897(1448) ack 1 win 17376 <nop,nop,timestamp 22 452447375>
15:16:55.251320 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 2897
win 2896 <nop,nop,timestamp 452447377 22>
15:16:55.251736 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
2897:4345(1448) ack 1 win 17376 <nop,nop,timestamp 22 452447375>
15:16:55.251741 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 4345
win 3620 <nop,nop,timestamp 452447377 22>
15:16:55.252947 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
4345:5793(1448) ack 1 win 17376 <nop,nop,timestamp 22 452447377>
15:16:55.252953 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 5793
win 4344 <nop,nop,timestamp 452447378 22>
The tcpdump below is from a successful (normal) connect:
16:49:13.925945 arp who-has rtemsaud2 tell rtemsaud2
16:49:13.960886 arp who-has 10.0.0.3 tell rtemsaud2
16:49:13.960893 arp reply 10.0.0.3 is-at 00:13:20:17:3c:26
16:49:13.961280 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: S
9999100:9999100(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp
0 0,nop,nop,ccne
w 2>
16:49:13.961296 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: S
37467410:37467410(0) ack 9999101 win 5840 <mss 1460,nop,wscale 2>
16:49:13.961838 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: . ack 1
win 17520
16:49:13.962147 IP 10.0.0.3.39056 > rtemsaud2.15376: S
29418578:29418578(0) win 5840 <mss 1460,sackOK,timestamp 457986930
0,nop,wscale 2>
16:49:13.962853 IP rtemsaud2.15376 > 10.0.0.3.39056: S
10061887:10061887(0) ack 29418579 win 17376 <mss 1460,nop,wscale
0,nop,nop,timestamp 0 457986
930>
16:49:13.962866 IP 10.0.0.3.39056 > rtemsaud2.15376: . ack 1 win 1460
<nop,nop,timestamp 457986930 0>
16:49:13.962945 IP 10.0.0.3.39056 > rtemsaud2.15376: P 1:45(44) ack 1
win 1460 <nop,nop,timestamp 457986930 0>
16:49:13.964441 IP rtemsaud2.15376 > 10.0.0.3.39056: P 1:33(32) ack 45
win 17376 <nop,nop,timestamp 0 457986930>
16:49:13.964448 IP 10.0.0.3.39056 > rtemsaud2.15376: . ack 33 win 1460
<nop,nop,timestamp 457986932 0>
16:49:14.166869 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
1:1461(1460) ack 1 win 17520
16:49:14.166886 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 1461
win 2190
16:49:14.166919 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: P
1461:2049(588) ack 1 win 17520
16:49:14.166926 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 2049
win 2920
16:49:14.167498 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
2049:3509(1460) ack 1 win 17520
16:49:14.167508 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 3509
win 3650
16:49:14.167550 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: P
3509:4097(588) ack 1 win 17520
16:49:14.167570 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 4097
win 4380
16:49:14.168097 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
4097:5557(1460) ack 1 win 17520
16:49:14.168103 IP 10.0.0.3.rockwell-csp2 > rtemsaud2.1024: . ack 5557
win 5110
16:49:14.169486 IP rtemsaud2.1024 > 10.0.0.3.rockwell-csp2: .
5557:7017(1460) ack 1 win 17520
Thank you :-)
- Next message: Andrei Voropaev: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Previous message: Paul Pluzhnikov: "Re: Suspicious _init() in core dump"
- In reply to: David Schwartz: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Next in thread: Andrei Voropaev: "Re: Howto reset and reuse a socket (not having a 7.80 sec delay)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]