Skip to content
Tcl Source Code History Of Ticket 1329754
Login

History Of Ticket 1329754

Artifacts Associated With Ticket 1329754

  1. Ticket change [54fdd67f39] (rid 94050) by dgp on 2005-10-18 18:01:37:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Attached script is demo of the problem.
      Start it in one shell window:
      
          tclsh sdtest.tcl server
      
      to start a server running.
      
      Start it in a second window:
      
          tclsh sdtest.tcl client
      
      to start a client of that server.
      
      The server shell window should
      print a sequence of messages
      it received from the client, starting
      with message 10 count down to 1.
      
      This works fine on linux and
      solaris.  On windows, the output
      does not reach message 1, but
      craps out about 4 or 5 messages
      short of all the data.  I did Windows
      testing with the ActiveTcl 8.4.11.2
      tclsh.
      
      A minor change to the client part
      of the demo script, so that the
      socket is explicitly made blocking
      *before* the final call to [flush], and
      the bug is worked around and all
      data passes through on Windows.
      
      This should not be required.  Sockets
      should not lose data on any platform.
      
    4. foundin initialized to: "obsolete: 8.4.11"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "27. Channel Types"
    10. title initialized to: "non-blocking sockets lose data on Windows"
    11. type initialized to: "Bug"
  2. Add attachment "sdtest.tcl" [ca7a29eee2] (rid 95352) by dgp on 2005-10-19 01:01:46.

  3. Ticket change [07640d6d84] (rid 89390) by dgp on 2005-10-19 01:01:48:

    1. icomment:
      
      
      File Added - 153032: sdtest.tcl
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [6baf26bd85] (rid 128369) by dgp on 2005-10-19 01:32:00:

    1. assignee changed to: "davygrvy"
  5. Ticket change [3e14e26b26] (rid 121203) by dgp on 2005-10-19 01:32:01:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Speculation this may be releated
      to 947693 ?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [5f553acd39] (rid 115802) by dgp on 2005-10-19 01:43:03:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      speculation appears to be false.
      
      ActiveTcl 8.4.7 has the same problem,
      and that's before the 847693 changes
      happened.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [efa03616c8] (rid 109026) by dgp on 2005-10-19 01:49:15:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Same problem present in the Oct. 2002
      ActiveTcl 8.4.0 release.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  8. Ticket change [35e6db3bcd] (rid 107018) by davygrvy on 2005-10-19 01:50:01:

    1. assignee changed to: "andreas_kupries"
    2. icomment:
      Logged In: YES 
      user_id=7549
      
      I do not have any development tools to work on this today. 
      reassigning to another.
      
      
    3. login: "davygrvy"
    4. mimetype: "text/plain"
    5. username: "davygrvy"
  9. Ticket change [dcdc29ed2a] (rid 114559) by dgp on 2005-10-19 01:54:23:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      same problem in the oldest ActiveTcl
      I found, 8.3.3 from April 2001.
      
      Looks like flushing non-blocking sockets
      on Windows has just been broken for
      a long, long time.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [abef5056ba] (rid 101204) by davygrvy on 2005-10-19 16:44:05:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      There is an odd situation with the generic layer where if an
      amount of read() operations caused by a given [gets] call
      consumes EOF to the generic layer it ends up being the
      responsibility of the channel driver to continue firing
      readable operations on the channel until it is closed.  IMO,
      EOF had already been read into the generic layer and given
      it's knowledge of EOF, shouldn't the channel driver's job be
      done regarding notification? And shouldn't it be the generic
      layer's responsibility to fire off readable instead? 
      Honestly, this is quite inefficient when the channel driver
      will never expect anymore system notifications for that
      socket anymore and needs manufacture them just for this
      situation.
      
      I'm not sure if this relates, though.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  11. Ticket change [4f5704a36a] (rid 125810) by dgp on 2006-01-11 04:11:29:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      looking at this again, it appears
      that what it required on the client
      side to avoid data loss is *both*
      an [fconfigure -blocking 1] and
      an explicit [close].
      
      If the client side is left non-blocking
      data is lost.  If the [close] command
      is not explicitly done, then the implicit
      close that should happen during [exit]
      loses data too.
      
      Note that it's all changes on the client
      side of the connection that make a difference.
      Configuring the server side doesn't seem to
      play a role at all, which suggests to me
      the problem is not with the read side of
      things.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [c9a7b816b5] (rid 122327) by dgp on 2006-01-11 04:19:45:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      did some more testing, and
      even in the case where the
      socket is never made non-blocking,
      data can still be lost if the
      client side does not perform
      an explicit [close].
      
      Revised summary to reflect that
      non-blocking is not essential to
      demo of the bug.
      
      So why would an explicit [close]
      differ from the Tcl_Close()
      that ought to be implicit
      in finalization?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. title changed to: "sockets lose data on Windows"
    5. username: "dgp"
  13. Ticket change [57fbbfb614] (rid 117727) by dgp on 2006-01-21 03:27:33:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      New reports are indicating that
      even forcing a [close] on the
      client side is not enough.
      
      If the "nice" level of the two
      processes are such that the client
      gets more cycles than the server,
      then it is reported that we still
      see data loss.
      
      Perhaps a second bug, server side
      this time?
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"