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

History Of Ticket 410674ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 410674ffffffffffffffffffffffffffffffffff

  1. Ticket change [81bd241eb9] (rid 117094) by ashmael on 2001-03-23 01:44:48:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This is a patch I believe to to fix bugs #219205 and 
      #219333 regarding dropped socket events on Windows.  
      The fix consists of moving the SendMessage() call that 
      re-enables the WSAAsyncSelect() handler to outside the 
      else {} block so that it will be called regardless of 
      the select() return value.  See Bug #219205 for a more 
      detailed analysis of the bug fix.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "ashmael"
    9. subsystem initialized to: "None"
    10. title initialized to: "Bug fix: #219205 and 219333 (event drop)"
    11. type initialized to: "Patch"
  2. Add attachment "tclWinSock.c.patch" [ab709cad9f] (rid 101116) by ashmael on 2001-03-23 08:44:50.

  3. Ticket change [304dfb2051] (rid 93224) by ashmael on 2001-03-23 08:44:51:

    1. icomment:
      
      
      File Added - 4543: tclWinSock.c.patch
      
      
      
    2. login: "ashmael"
    3. mimetype: "text/plain"
    4. username: "ashmael"
  4. Ticket change [81565690b0] (rid 117015) by hobbs on 2001-03-24 10:00:12:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      The patch is off by a few lines for 8.4a2, but it does pass 
      all the test suites after being applied.  Also an example 
      with C source now passes that still failed in pre-patch 
      8.4a2 code.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  5. Ticket change [df75c89b82] (rid 115019) by dgp on 2001-03-26 23:43:34:

    1. subsystem changed to: "27. Channel Types"
  6. Ticket change [699cc6d2d7] (rid 103282) by hobbs on 2001-03-31 07:39:06:

    1. closedate changed to: "2001-03-31T00:39:06"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      After some back and forth discussion, it was decided to go 
      with:
      
      diff -b -c -r1.19 tclWinSock.c
      *** win/tclWinSock.c    2000/09/28 06:38:23     1.19
      --- win/tclWinSock.c    2001/03/31 00:27:25
      ***************
      *** 836,844 ****
              if ((*winSock.select)(0, &readFds, NULL, NULL, 
      &timeout) != 0) {
                  mask |= TCL_READABLE;
              } else {
                  SendMessage(tsdPtr->hwnd, SOCKET_SELECT,
                          (WPARAM) SELECT, (LPARAM) infoPtr);
      -           infoPtr->readyEvents &= ~(FD_READ);
              }
            }
            if (events & (FD_WRITE | FD_CONNECT)) {
      --- 836,844 ----
              if ((*winSock.select)(0, &readFds, NULL, NULL, 
      &timeout) != 0) {
                  mask |= TCL_READABLE;
              } else {
      +           infoPtr->readyEvents &= ~(FD_READ);
                  SendMessage(tsdPtr->hwnd, SOCKET_SELECT,
                          (WPARAM) SELECT, (LPARAM) infoPtr);
              }
            }
            if (events & (FD_WRITE | FD_CONNECT)) {
      
      
      This just moves the infoPtr flag correction before the 
      SendMessage.  It appears we were hitting a rare race 
      condition that could cause the hang, where the recipient of 
      the SendMessage received the message before the infoPtr 
      flags could be corrected.  This was tested again from 8.2-
      8.4a2.  In 8.4a2cvs.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"
  7. Ticket change [daace9a44c] (rid 107831) by kensdorf on 2002-12-19 02:14:23:

    1. icomment:
      Logged In: YES 
      user_id=671771
      
      We have seen a similar problem in version 8.3.2.  We 
      determined that it has to do with the FD_ACCEPT bit being 
      cleared prematurely when two "accept" events come in 
      simultaneously.  This happens due to a race condition in the 
      code where the infoPtr's acceptEventCount is checked and 
      the flag is subsequntly cleared.  If an accept event occurs 
      during this operation, it will never be processed if the 
      FD_ACCEPT flag is cleared by the tcl application thread after 
      it has been set by the "SocketProc" thread.  We fixed this by 
      protecting access to this flag and the acceptEventCount 
      variable with a critical section object.  If anyone would like 
      more details about our fix, please let me know.
      
      
    2. login: "kensdorf"
    3. mimetype: "text/plain"
    4. username: "kensdorf"
  8. Ticket change [63b95b6a7d] (rid 92634) by hobbs on 2002-12-19 03:38:04:

    1. closedate changed to: "2002-12-18T20:38:04"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      8.3.2 would be prior to the mentioned bug fix.  If you still have 
      the issue in 8.4.1 (or perhaps it was backported for 8.3.5), 
      then please submit a new bug report with your patch.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. username: "hobbs"