This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug manual/1983] socket(s, 1) said to discard sent data


------- Additional Comments From bpeeluk at yahoo dot co dot uk  2007-10-16 16:48 -------
I've just wasted a fair amount of coding time after being mislead by this bug so
I'm just commenting in the hope that it will encourage someone to change it.

You can demonstrate that it doesn't discard the pending send data with the
attached program. The program opens a connection to the given web server, sleeps
for 5 seconds, then calls shutdown. If you disconnect your network cable or set
up a firewall within those five seconds, you can see with tcpdump that the OS
still tries to send the data even though shutdown was called.

# Establish connection

17:42:39.081415 IP 192.168.1.201.1708 > 209.132.176.174.80: S
4039457085:4039457085(0) win 5840 <mss 1460,sackOK,timestamp 385240294
0,nop,wscale 3>
17:42:39.268932 IP 209.132.176.174.80 > 192.168.1.201.1708: S
810590603:810590603(0) ack 4039457086 win 5792 <mss 1418,sackOK,timestamp
3715979507 385240294,nop,wscale 4>
17:42:39.268970 IP 192.168.1.201.1708 > 209.132.176.174.80: . ack 1 win 730
<nop,nop,timestamp 385240341 3715979507>

# Sleep for five seconds, network cable is pulled out in this time

# Now you can see that the client is still trying to send the data, even though
shutdown has been called and the program is no longer running.

17:42:44.271789 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385241592 3715979507>
17:42:44.272235 IP 192.168.1.201.1708 > 209.132.176.174.80: F 1025:1025(0) ack 1
win 730 <nop,nop,timestamp 385241592 3715979507>
17:42:45.219521 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385241829 3715979507>
17:42:47.115725 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385242303 3715979507>
17:42:50.908161 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385243251 3715979507>
17:42:58.493019 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385245147 3715979507>
17:43:13.662722 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385248939 3715979507>
17:43:44.002164 IP 192.168.1.201.1708 > 209.132.176.174.80: P 1:1025(1024) ack 1
win 730 <nop,nop,timestamp 385256523 3715979507>


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bpeeluk at yahoo dot co dot
                   |                            |uk


http://sourceware.org/bugzilla/show_bug.cgi?id=1983

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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