Skip to content
Tcl Source Code History Of Ticket 5425f2c082
Login

History Of Ticket 5425f2c082

Artifacts Associated With Ticket 5425f2c082

  1. Ticket change [68344473ee] (rid 135545) by oehhar on 2013-11-12 08:52:47:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      <h1>Issue</h1>
      In an asyncroneous socket connect, there might be errors flagged even if the connect finally succeedes.
      
      This appeared on MAC-OS X with tcl8.6.1.
      
      <h1>Demo</h1>
      We have a server socket on an IPV6 enabled system which only binds to the IPV4 address.
      This might be done in a tclsh console with the following program:
      <verbatim>
      % proc accept {s a p} {
           puts ok
      }
      % socket -server accept -myaddr 127.0.0.1 61680
      sock192
      % vwait a
      </verbatim>
      
      In a second tclsh, the following is run:
      <verbatim>
      % set client [socket -async localhost 61680]
      sock103825910
      % fconfigure $client -error
      connection refused
      % update
      % fconfigure $client -error
      % fconfigure $client -sockname
      ::1 localhost 64153
      </verbatim>
      
      The issue is the flagged "connection refused" and the final connect.
      
      <h1>References</h1>
      
      Reported by DKF on Ticket [13d3af3ad5] and copied here by oehhar.
      
    5. foundin initialized to: "8.6.1"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "oehhar"
    14. subsystem initialized to: "25. Channel System"
    15. title initialized to: "Async socket connect"
    16. type initialized to: "Bug"
  2. Ticket change [db83032388] (rid 135546) by oehhar on 2013-11-12 08:54:02:

    1. assignee changed to: "max"
    2. login: "oehhar"
    3. mimetype: "text/plain"
    4. title changed to:
      Async socket connect may flag error and still connects
      
  3. Ticket change [f6cf3e6f3c] (rid 135552) by dkf on 2013-11-12 12:22:33:

    1. icomment:
      To be clear, the issue is that <i>looking</i> at the transient error prevents the client from ever connecting. That's much more serious than merely seeing a transient error.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  4. Ticket change [afb5164b9c] (rid 135569) by max on 2013-11-12 13:27:29:

    1. closedate changed to: "2456609.06075973"
    2. closer changed to: "max"
    3. icomment:
      Fixed in [80ca9fe746] and [f644fb5a9f].
      
      When implementing multi-address [socket -async], I thought it would only be used together with fileevent, and [fconfigure -error] would not be called before the readable event has fired. But now I see that -async without fileevent even makes sense, e.g. to trace the addresses that were tried and why each of them failed, so the error caching (reading SO_ERROR is destructive) needs to go both ways, from the event handler hidden behind [socket -async] to [fconfigure -error] and vice versa.
      
    4. login: "max"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
  5. Ticket change [8cad74d1f3] (rid 135581) by max on 2013-11-12 15:50:56:

    1. closedate changed to: "2456609.16037655"
    2. icomment:
      Just for completeness: the tracing I mentioned in the last comment doesn't work as I thought, because [fconfigure -peername] is not available before the socket is connected.
      
    3. login: "max"
    4. mimetype: "text/plain"