Skip to content
Tcl Source Code History Of Ticket 219195ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 219195ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 219195ffffffffffffffffffffffffffffffffff

  1. Ticket change [6ccce1428e] (rid 128583) by nobody on 2000-10-26 05:03:23:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2713 Bug
      Version: 8.0p2
      SubmitDate: '1999-09-10'
      LastModified: '1999-11-10'
      Severity: SER
      Status: Assigned
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Solaris
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Hermann Hüni
      
      Comments:
      Is this bug already fixed in a later release of tcl?
      
      ReproducibleScript:
      static Tcl_Channel remoteServerChannel;
          
          int main()
          {
            /*
             *open client socket to remote server
             */
            remoteServerChannel = Tcl_OpenTcpClient(/* interp */ NULL,
            /* port */ remoteServerPortNb,
            /* host */ remoteServer,
            /* myaddr */ NULL, /* myport */ 0,
            /* async */ 1);
          
            if (remoteServerChannel == NULL) {
              /*
               *tcp open has failed
               */
              perror("Tcl_OpenTcpClient failed:");
              exit(-1);
            }
          
            /*
             * register establishedEvent handler for this channel
             */
            Tcl_CreateChannelHandler(remoteServerChannel,
             TCL_WRITABLE|TCL_EXCEPTION,
             establishedEvent,
             (ClientData)remoteServerChannel);
          
          }
          
          /* 
           *socket connection established Event callback
           */
          static void establishedEvent(ClientData clientData, int mask)
          {
            Tcl_Channel channel = (Tcl_Channel)clientData;
          
          {
            Tcl_DString optionString;
            Tcl_DStringInit(&optionString);
            {
              int success = Tcl_GetChannelOption(/* interp */ NULL,
                 aChannel,
                 /* optionName */ "-peername",
                 &optionString);
          
              /* ... */
              }
            }
          }
          
          ./myClient someHost undeployedPortNumber
      
      ObservedBehavior:
      In the following usage:
          
          ./myClient someHost undeployedPortNumber
          
          the Tcl_OpenTcpClient call does not return NULL and
          the establishedEvent callback is NEVER called.
          
          How can we get to know, that the socket connection will never succeed?
          
          Here is a real trace:
          
          bash$ ./myClient butler 799999
          main; channel options are: /-blocking 1 -buffering line -buffersize 4096
          -eofchar {{} {}} -translation {auto crlf} -sockname {0.0.0.0 0.0.0.0 0}/
          
          We could check for -sockname  not beeing {0.0.0.0 0.0.0.0 0}  as a work
          around just after the
          the call to Tcl_OpenTcpClient() ?
          
          But the real place to check the success or failure should be in the
          establishedEvent() callback.
          Unfortunately, this callback does never occur. This seems to be a real
          bug.
          
          I am using tcl8.0p2 on Solaris 2.7.
          
          Democode is available uppon demand
      
      DesiredBehavior:
      The establishedEvent() callback should occur as it does, if we give an
          unreachable host.
      
      
      
      This should be tried again with 8.2.2, there have been many fixes
      in this area since 8.0p2. 
      -- 11/10/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.0p2"
    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: "async Tcl_OpenTcpClient failure remains undetected"
    11. type initialized to: "Bug"
  2. Ticket change [e188c4de22] (rid 87467) by dkf on 2001-01-16 20:42:38:

    1. icomment:
      Is it possible to open this socket in asynchronous mode (with the flag -async)?  Then you can get a timeout quite simply using the [after] command, and you know (by watching for either the timer event or a writable fileevent) whether you've successfully connected or not.
      
      Hmm.  Perhaps the -async option should note (via demo-code?) that any [fileevent writable] events defined on an async socket get fired when the connection is made...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [424443d64f] (rid 116340) by dgp on 2001-04-01 01:47:33:

    1. subsystem changed to: "27. Channel Types"
  4. Ticket change [fbbea226ae] (rid 108110) by andreas_kupries on 2001-09-08 06:28:24:

    1. assignee changed to: "andreas_kupries"
  5. Ticket change [aa5e943f55] (rid 99312) by andreas_kupries on 2001-09-12 03:01:35:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Hermann Hüni <[email protected]>
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  6. Ticket change [9996517e8f] (rid 110819) by dgp on 2002-07-06 03:36:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Another candidate for oldest Open bug.
      
      Still valid?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [248f781b45] (rid 131126) by davygrvy on 2003-04-23 03:44:03:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      fileevent writeable should fire upon either success or error, 
      IIRC.
      
      How TCL_EXCEPTION relates to the specifics of the winsock 
      channel driver is unknown to me :)
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  8. Ticket change [3211973cac] (rid 93546) by dkf on 2004-02-25 21:31:11:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Can error information be retrieved (in a writable fileevent)
      using the -error option to fconfigure?  ISTR that that's the
      way it is supposed to happen...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [72881bbde9] (rid 100875) by andreas_kupries on 2006-03-16 04:00:53:

    1. closedate changed to: "2006-03-15T21:00:53"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      
      I just tried using 8.4 branch head using the attached Tcl
      script, and the writable event fires for both successful and
      failed connections. In case of a failure [fconfigure -error]
      contains an error message. It is empty otherwise.
      
      This for linux. On solaris the 'socket'-creation actually
      came back with an error for a bad host, or port withoit
      listener.
      
      The C stuff should work in the same manner.
      
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Out of Date"
    7. status changed to: "Pending"
    8. username: "andreas_kupries"
  10. Ticket change [737a51be11] (rid 105047) by andreas_kupries on 2006-03-16 04:00:54:

    1. icomment:
      
      
      File Added - 171040: async_event.tcl
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  11. Add attachment "async_event.tcl" [8b26f59332] (rid 127512) by andreas_kupries on 2006-03-16 04:00:54.

  12. Ticket change [1f92f6c89e] (rid 91169) by sf-robot on 2006-03-30 10:20:54:

    1. closedate changed to: "2006-03-30T03:20:54"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"