Skip to content
Tcl Source Code History Of Ticket 3295154fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3295154fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3295154fffffffffffffffffffffffffffffffff

  1. Ticket change [99b0dce3ae] (rid 110832) by mb-austin on 2011-04-29 22:34:42:

    1. assignee initialized to: "nijtmans"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OS - Windows Vista
      Tcl Version - Activestate  8.6b1.2
      
      creating multiple client sockets over a short period of time cause the server socket to quit responding.  Incoming connections are accepted, but the command for the server socket server is never called.
      
      I've include a single file that causes the problem on my machine.  it builds a socket server that just listens for connections and logs when one comes in.
      It also creates 10 client requests.
      Only some fraction of these client requests are logged.
      
      I was worried that it might be caused from the client/server running from the same program, so I split up and ran with client on one machine and server on another.  The same problem still happened.  
      
      ---- server.tcl -----
      set connection_count 0
      proc connect {args} {
          incr ::connection_count
          puts stdout "$::connection_count -- connect from $args"
      }
      
      
      socket -server connect 4444
      
      puts stdout "waiting for connection"
      vwait forever
      
      ------- end of server.tcl ------------
      
      
      
      ----- client.tcl -------------
      proc doit {{count 10}} {
          for {set x 1} {$x <= $count} {incr x} {
              puts stdout "$x  -- start connection "
              socket localhost 4444
              #after  1
          }
      }
      doit
      
      -------- end of client.tcl ------
      
      Expected Output:
      I would expect for the server to show 10 connections.
      the actual result is some number < 10.. by tweaking the after value in the client you can slow it down enough to get all 10 requests.
      
      
      I thought this might be a problem with too many sockets in a TIMED_WAIT state, but I waited until I had no sockets in the timed wait state, ran the test and got this result
      
      
      $ tcl sockettest.tcl
      1 -- start CLIENT
      1 -- SERVER -- connect from  sock420 127.0.0.1 61692
      2 -- start CLIENT
      2 -- SERVER -- connect from  sock428 127.0.0.1 61693
      3 -- start CLIENT
      3 -- SERVER -- connect from  sock440 127.0.0.1 61694
      4 -- start CLIENT
      5 -- start CLIENT
      4 -- SERVER -- connect from  sock460 127.0.0.1 61695
      6 -- start CLIENT
      7 -- start CLIENT
      8 -- start CLIENT
      9 -- start CLIENT
      10 -- start CLIENT
      total connections:  4
      
      
      
      
    4. foundin initialized to: "obsolete: 8.6b1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "mb-austin"
    10. subsystem initialized to: "02. Event Loops"
    11. title initialized to: "Sockets not responding"
    12. type initialized to: "Bug"
  2. Ticket change [f15bbb3d06] (rid 109354) by mb-austin on 2011-04-30 05:34:42:

    1. icomment:
      
      
      File Added - 410269: sockettest.tcl
      
      
      
    2. login: "mb-austin"
    3. mimetype: "text/plain"
    4. username: "mb-austin"
  3. Add attachment "sockettest.tcl" [39ee70db18] (rid 112475) by mb-austin on 2011-04-30 05:34:42.

  4. Ticket change [6bb534012c] (rid 128372) by mb-austin on 2011-04-30 05:46:00:

    1. icomment:
      A little more searching shows that it is very similar (if not identical) to
       bug 3056775.
      
      That bug was reported as fixed.
      
      
      
      
    2. login: "mb-austin"
    3. mimetype: "text/plain"
    4. username: "mb-austin"
  5. Ticket change [7c9388dd15] (rid 97103) by nijtmans on 2013-01-23 17:32:16:

    1. closedate changed to: "2013-01-23T10:32:16"
    2. closer changed to: "nijtmans"
    3. icomment:
      I cannot reproduce this (On Windows 7, win32),
      just always getting all 10 expected connections.
      
      Regards,
              Jan Nijtmans
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Works For Me"
    7. status changed to: "Pending"
    8. username: "nijtmans"
  6. Ticket change [163f2a221e] (rid 124686) by twylite on 2013-01-23 17:55:42:

    1. icomment:
      I strongly suspect this is bug 3056775 "Socket -server stops accepting connections under load", which has been fixed.  See https://sourceforge.net/tracker/?func=detail&aid=3056775&group_id=10894&atid=110894.
      
      I can reproduce this bug on $tcl_patchLevel = 8.6b1.2 (which is what 3056775 was reported against), but have no problems on 8.6.0 release (built from Fossil tag, using MSVC10).
      
      ... and now I see mb-austin's comment to the same effect ;)  Recommend you try with the latest ActiveState release.
      
      
    2. login: "twylite"
    3. mimetype: "text/plain"
    4. username: "twylite"
  7. Ticket change [64e2bcce3c] (rid 92847) by nijtmans on 2013-01-23 23:14:06:

    1. closedate changed to: "2013-01-23T16:14:06"
    2. closer changed to: "nijtmans"
    3. icomment:
      Dup of 3056775, closing.
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "nijtmans"