Skip to content
Tcl Source Code History Of Ticket 218324
Login

History Of Ticket 218324

Artifacts Associated With Ticket 218324

  1. Ticket change [24c0ff6d40] (rid 131159) by nobody on 2000-10-26 00:56:10:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 3841 Bug
      Version: 8.2.2
      SubmitDate: '1999-12-10'
      LastModified: '2000-04-19'
      Severity: SER
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Solaris
      OSVersion: Solaris 2.7
      Machine: UE2 UE450
      FixedDate: '2000-10-25'
      ClosedDate: '2000-04-19'
      
      
      Name:
      Christian Williams
      
      Comments:
      we use a Tcl-based chat server on our web site; every time a client becomes
      unreachable (i.e., its computer crashes, goes offline, etc), the whole server
      freezes up for as much as 60 seconds, while Unix decides that the connection
      is dead and returns an error on the send().  obviously this isn't a great user
      experience, and is our #1 complaint from our users.
      
      apart from this problem, Tcl works great as a server of this sort.
      
      ReproducibleScript:
      run this script from one host:
      --------------------------------------------
      proc run { sock args } {
        puts "Got connection... hit return to write"
        gets stdin
        set x 0
        while {$x < 10000} {
          puts -nonewline "\r$x bytes"; flush stdout
          puts -nonewline $sock "."; flush $sock
          incr x
        }
        puts ""; exit
      }
      
      socket -server run 6666
      vwait forever
      --------------------------------------------
      
      on another host, connect to that port:
         telnet hosta 6666
      
      now unplug the network connection of the second host, and hit
      return on the first.  the script will output data until it fills Unix's
      send buffer, then block in the puts.  this behaviour is the same
      no matter what the socket's fconfigure options are.
      
      ObservedBehavior:
      .....
      send(4, " .", 1, 0)                             = 1
      write(1, "\r 8 1 9 2   b y t e s", 11)          = 11
      send(4, " .", 1, 0)                             = 1
      write(1, "\r 8 1 9 3   b y t e s", 11)          = 11
      send(4, " .", 1, 0)             (sleeping...)
      
      DesiredBehavior:
      the fblocked command should indicate whether a puts will actually block,
      or there should be a configurable buffer size for writes,
      or Tcl should return an error,
      or ANYTHING but blocking!     ; )
      
      
      
      The user mentions fblocked, but I don't see it used.  In fact,
      it looks like this might all be cleared up if the user were
      to use non-blocking sockets throughout and base it all on
      fileevents.  Unless that case also hangs (which isn't specified). 
      -- 04/19/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.2.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "63. (unused)"
    10. title initialized to: "socket writes hanging if endpoint can't be reached"
    11. type initialized to: "Bug"
  2. Ticket change [0dcff6fc60] (rid 114429) by welch on 2000-10-26 08:19:01:

    1. closedate changed to: "2000-10-26T01:19:01"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [81a7dceda7] (rid 117079) by dgp on 2001-04-01 01:48:01:

    1. closedate changed to: "2001-03-31T18:48:01"
    2. closer changed to: "dgp"
    3. subsystem changed to: "27. Channel Types"