Skip to content
Tcl Source Code History Of Ticket 218409
Login

History Of Ticket 218409

Artifacts Associated With Ticket 218409

  1. Ticket change [3bc7d45154] (rid 112804) by nobody on 2000-10-26 00:57:14:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 5370 Bug
      Version: 8.3
      SubmitDate: '2000-05-05'
      LastModified: '2000-05-18'
      Severity: CRIT
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Windows NT
      OSVersion: NT 4.0, SP 5
      Machine: Gateway E5200 (Dual PII)
      FixedDate: '2000-10-25'
      ClosedDate: '2000-05-18'
      
      
      Name:
      Pete Tinker
      
      Extensions:
      NONE
      
      CustomShell:
      NONE.  Using the Windows NT binaries only.
      
      Comments:
      This was the response to my earlier posting of this problem, after which
          the bug was reported as "closed."  I must have mis-communicated
          something.  The problem is *NOT* with reading and writing the sockets.
          The problem is that the accept callback is never invoked by incoming
          client requests.  Using fileevent has no relevance here.  Note that my
          examples do not even try to read or write the sockets -- they just try
          to connect/accept, and this is what does not work.
      
          Comments
      
                  Comments on: TR#2178 apparently not fixed in Tcl 8.3. Server
          never accepts incoming connects.
      
                  Noted in newsgroup:
      
                  You aren't setting any fileevents in the accept.
                  That isn't the readable and writeable proc lumped into one.
                  --
                  * David Gravereaux * 
                  -- 04/24/2000 hobbs
      
                  -- Jeffrey Hobbs on May 05, 2000 03:45 AM
      
      ReproducibleScript:
      SCRIPT 1:
      
      set GUIsockR -1
      set GUIsockW -1
      
      proc GUIAccept "sock addr port" {
          global GUIsockR GUIsockW
      
          puts "in accept"
          fconfigure $sock -buffering line
          if {$GUIsockR == -1} {
      set GUIsockR $sock
          } else {
      set GUIsockW $sock
          }
      }
      
      proc connectToWTK "" {
          global GUIsockR GUIsockW
      
          set server [socket -server GUIAccept 5559]
          vwait GUIsockR
      }
      
      connectToWTK
      puts done
      
      SCRIPT 2:
      
      set GUIsockR -1
      set GUIsockW -1
      
      set i 5559
      while 1 {
          if {[catch {set GUIsockR [socket localhost i]} error]} {
      puts "can't open socket for reading:  $error"
      incr i
      after 500
          } else {
      break;
          }
      }
      
      puts "connected R"
      
      fconfigure $GUIsockR -buffering line
      
      after 2000
      
      while 1 {
          if {[catch {set GUIsockW [socket localhost $i]} error]} {
      puts "can't open socket for writing:  $error"
      after 500
          } else {
      break;
          }
      }
      fconfigure $GUIsockW -buffering line
      
      puts "connected W"
      
      INSTRUCTIONS:
      Run the scripts using two instances of tclsh 83 (make sure they both use the same port numbers, and run them on the same machine).  There will be no output from GUIAccept.  The problem is not with the configuration of GUIsockR and GUIsockW -- the accept callback is simply never invoked.  I've tried to set a fileevent on the server socket itself, but TCL rejects that, saying it is neither readable nor writable.
      
      This works just fine if I go back to Tcl8.1.1.   TR#2178 claimed it was broken, then fixed again in later releases, but this does not seem to be the case for me.
      
      ObservedBehavior:
      Both scripts hang, with no output.
      
      DesiredBehavior:
      I expect at least to see that GUIAccept is called.  I should also see that both GUISockR and GUISockW are instantiated, with messages to that effect.
      
      
      
      Using 8.3.1 I find that these work as expected.  There is no
      problem with socket connection or communication. 
      -- 05/18/2000 hobbs
      
    4. foundin initialized to: "obsolete: 8.3"
    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:
      TR#2178 apparently STILL not fixed in Tcl 8.3. Server never 
      
    11. type initialized to: "Bug"
  2. Ticket change [bb6dd9c3d4] (rid 129478) by welch on 2000-10-26 08:21:18:

    1. closedate changed to: "2000-10-26T01:21:18"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [c1399d15c3] (rid 111286) by dgp on 2001-04-01 01:47:56:

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