This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: shutdown( socket, SHUT_WR ) - unexpected behaviour


Hi Dave,

> Just kind of wondering if the apache is prematurely dropping the line when
> it sees the FIN.

No it doesn't.  Here is dump when connecting to example.org:

> 01:14:34.237976 win2k.3042 > example.org.80: S 3273603871:3273603871(0) win 16384 <mss 1460,nop,nop,sackOK> (DF)
> 01:14:34.423719 example.org.80 > win2k.3042: S 3414317864:3414317864(0) ack 3273603872 win 5840 <mss 1460,nop,nop,sackOK> (DF)
> 01:14:34.423843 win2k.3042 > example.org.80: . ack 1 win 17520 (DF)
> 01:14:34.423935 win2k.3042 > example.org.80: P 1:19(18) ack 1 win 17520 (DF)
> 01:14:34.424017 win2k.3042 > example.org.80: F 19:19(0) ack 1 win 17520 (DF)
> 01:14:34.612657 example.org.80 > win2k.3042: . ack 19 win 5840 (DF)
> 01:14:34.613410 example.org.80 > win2k.3042: F 703:703(0) ack 19 win 5840 (DF)
> 01:14:34.613539 win2k.3042 > example.org.80: . ack 1 win 17520 <nop,nop,sack sack 1 {703:704} > (DF)
> 01:14:34.616794 example.org.80 > win2k.3042: P 1:703(702) ack 19 win 5840 (DF)
> 01:14:34.617027 win2k.3042 > example.org.80: R 3273603891:3273603891(0) win 0 (DF)
> 01:14:34.617331 example.org.80 > win2k.3042: . ack 20 win 5840 (DF)
> 01:14:34.617435 win2k.3042 > example.org.80: R 3273603891:3273603891(0) win 0

Hmm, FIN is sent before actual data, but this should be handled by TCP
stack witout problems (sequence numbers are ok).

And here is one when connecting to google.com:

> 01:19:00.639216 win2k.3064 > google.com.80: S 4253018133:4253018133(0) win 16384 <mss 1460,nop,nop,sackOK> (DF)
> 01:19:00.748937 google.com.80 > win2k.3064: S 1190391422:1190391422(0) ack 4253018134 win 8190 <mss 1460>
> 01:19:00.749137 win2k.3064 > google.com.80: . ack 1 win 17520 (DF)
> 01:19:00.749239 win2k.3064 > google.com.80: P 1:19(18) ack 1 win 17520 (DF)
> 01:19:00.749324 win2k.3064 > google.com.80: F 19:19(0) ack 1 win 17520 (DF)
> 01:19:00.868893 google.com.80 > win2k.3064: P 1:592(591) ack 20 win 31460
> 01:19:00.869221 win2k.3064 > google.com.80: R 4253018153:4253018153(0) win 0 (DF)

In both cases http reply is sent by server, but client answers with RST
instead of ACK.


For reference here are dumps generated by running the same code on
FreeBSD box:

> 01:23:47.548080 bsd.49159 > example.org.80: S 2808270330:2808270330(0) win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 383076 0> (DF)
> 01:23:47.739494 example.org.80 > bsd.49159: S 3999683607:3999683607(0) ack 2808270331 win 5792 <mss 1460,nop,nop,timestamp 11166371 383076,nop,wscale 0> (DF)
> 01:23:47.739559 bsd.49159 > example.org.80: . ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.739631 bsd.49159 > example.org.80: P 1:19(18) ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.739647 bsd.49159 > example.org.80: F 19:19(0) ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.926501 example.org.80 > bsd.49159: . ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.927939 example.org.80 > bsd.49159: F 703:703(0) ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.927980 bsd.49159 > example.org.80: F 19:19(0) ack 1 win 33304 <nop,nop,timestamp 383114 11166468> (DF)
> 01:23:47.931289 example.org.80 > bsd.49159: P 1:703(702) ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.931318 bsd.49159 > example.org.80: F 19:19(0) ack 704 win 32953 <nop,nop,timestamp 383114 11166468> (DF)
> 01:23:47.934490 example.org.80 > bsd.49159: . ack 20 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:48.122954 example.org.80 > bsd.49159: . ack 20 win 5792 <nop,nop,timestamp 11166569 383114> (DF)


> 01:25:41.588049 bsd.49161 > google.com.80: S 2950247753:2950247753(0) win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 562478 0> (DF)
> 01:25:41.725996 google.com.80 > bsd.49161: S 1587602094:1587602094(0) ack 2950247754 win 8190 <mss 1460>
> 01:25:41.726052 bsd.49161 > google.com.80: . ack 1 win 65535 (DF)
> 01:25:41.726122 bsd.49161 > google.com.80: P 1:19(18) ack 1 win 65535 (DF)
> 01:25:41.726144 bsd.49161 > google.com.80: F 19:19(0) ack 1 win 65535 (DF)
> 01:25:41.847393 google.com.80 > bsd.49161: P 1:592(591) ack 20 win 31460
> 01:25:41.941043 bsd.49161 > google.com.80: . ack 592 win 65535 (DF)
> 01:25:42.054825 google.com.80 > bsd.49161: F 592:592(0) ack 20 win 31460
> 01:25:42.054863 bsd.49161 > google.com.80: . ack 593 win 65534 (DF)

Regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]