public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bpeeluk at yahoo dot co dot uk" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug manual/1983] socket(s, 1) said to discard sent data
Date: Tue, 16 Oct 2007 16:48:00 -0000	[thread overview]
Message-ID: <20071016164846.8060.qmail@sourceware.org> (raw)
In-Reply-To: <20051206115443.1983.ceder@ingate.com>


------- 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.


  reply	other threads:[~2007-10-16 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-06 11:54 [Bug manual/1983] New: " ceder at ingate dot com
2007-10-16 16:48 ` bpeeluk at yahoo dot co dot uk [this message]
2007-10-16 16:53 ` [Bug manual/1983] " bpeeluk at yahoo dot co dot uk
     [not found] <bug-1983-131@http.sourceware.org/bugzilla/>
2012-08-28 22:17 ` a.herefishyfishies at yahoo dot com
2013-10-21  6:48 ` neleai at seznam dot cz
2014-06-30 18:16 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071016164846.8060.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).