Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3bc7d4515414f85a6e47f298da98c7c3e68119af
Ticket: 218409ffffffffffffffffffffffffffffffffff
TR#2178 apparently STILL not fixed in Tcl 8.3. Server never
User & Date: nobody on 2000-10-26 00:57:14
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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 changed to: "obsolete: 8.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "63. (unused)"
  10. title changed to:
    TR#2178 apparently STILL not fixed in Tcl 8.3. Server never 
    
  11. type changed to: "Bug"