Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3510c5a213cfff9acdccb52f233b6f15f058b3d3
Ticket: 336441ed59c9f49fb2dc5414911f5c90c7acdec3
socket -async stall on windows
User & Date: oehhar on 2014-03-11 10:27:03
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Within branch [https://core.tcl.tk/tcl/timeline?r=win-sock-async-connect-race-fix|win-sock-async-connect-race-fix], in checkin [521b7229c4], Andreas Kupries reports about socket-async stalls due to not delivered FD_CONNECT event by the operating system.
    Read the checkin comment for the issue.
    
    Issues:
    
       *   gets or puts may never return on a socket with async connection
       *   the connection notification FD_CONNECT is not observed
    
    Conclusion:
       *   FD_CONNECT is not sent by the OS
    
    Action:
       *   Use FD_WRITE as a fallback. There is already such code in the notifier proc. The proposed fix uses that to exit gets/puts.
    
    This ticket is created to discuss the issue.
    
    Reinhard Max and Harald Oehlmann are working on the 8.6.x socket code in the branch [https://core.tcl.tk/tcl/timeline?r=bug-13d3af3ad5|bug-13d3af3ad5].
    
    There, the same issue was observed. The conclusion was: 
       *   FD_CONNECT is not delivered, if the socet connect fails between the connect() call and the WSAAsyncSelect() call
       *   FD_CONNECT is ignored if delivered between the WSAAsyncSelect() call and the insertion of the socket structure in TcpThreadActionProc()
    
    Within the branch [https://core.tcl.tk/tcl/timeline?r=bug-13d3af3ad5|bug-13d3af3ad5], those issues are fixed.
    
    The workaround to use FD_WRITE instead FD_CONNECT was removed in [https://core.tcl.tk/tcl/timeline?r=bug-13d3af3ad5|bug-13d3af3ad5].
    The issue of this is, that an eventual connect failure is not detected.
    It should be reintroduced, if the information "FD_CONNECT's are not delivered" is correct.
    
    This work is in accordance what is done on the Unix side.
    
  5. foundin changed to: "8.5.15"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "24. Channel Commands"
  15. title changed to: "socket -async stall on windows"
  16. type changed to: "Bug"