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

History Of Ticket 1521416fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1521416fffffffffffffffffffffffffffffffff

  1. Ticket change [fab8bbf2c3] (rid 91928) by nobody on 2006-07-12 19:53:10:

    1. assignee initialized to: "vasiljevic"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The original usenet posting - 
       All 5 messages in topic - view as tree
      
      From:[email protected] - view profile
      Date:Tues, Jul 11 2006 11:01 am
      Email: [email protected]
      Groups: comp.lang.tcl
      Not yet rated
      Rating: 
      show options
      
      Reply | Reply to Author | Forward | Print | Individual
      Message | Show original | Report Abuse | Find messages
      by this author
      
      I am running tcl 8.4 on Windows XP Pro 2002, SP2.
      The simple script below fails on thread::create right
      under 12,000
      iterations.
      
      Attempts to create any more threads fail in the same
      shell once a call
      to
      thread::create fails.
      Restarting tclsh and rerunning seems to work fine
      within the limits
      mentioned
      above.
      
      Would anyone know the reason this would fail?
      
      ---------------
      tclsh
      package require Thread
      set i 1
      while { 1 } {
        set id [thread::create]
        thread::release $id
        puts -nonewline " $i "
        flush stdout
        update
        incr i
      
      } 
      
      
      
      
      From:David Gravereaux - view profile
      Date:Wed, Jul 12 2006 12:17 pm
      Email: David Gravereaux <[email protected]>
      Groups: comp.lang.tcl
      Not yet rated
      Rating: 
      show options
      
      Reply | Reply to Author | Forward | Print | Individual
      Message | Show original | Report Abuse | Find messages
      by this author
      
      -----BEGIN PGP SIGNED MESSAGE-----
      Hash: SHA1
      
      joe,
      
      I ran your script this time and I see what's going on :)
      
      The Tclsh process runs out of virtual memory space! 
      Not committed
      memory..  True VM allocations.  I even tried the old
      fashioned way with
      thread::wait and thread::unwind that I personally know
      for a fact do not
      leak handles..  The issue is not a handle leak.  The
      issue is not
      committed memory (apparently), but it appears that for
      each thread
      created, a slice of VM is given to it permanently and
      that slice isn't
      recouped (though it appears to have been uncommitted).
      
      Joe, insert your script as a new bug.  There's
      something going on that's
      a bit deeper than proper handle management.
      
      the Old way (that has the same behavior):
      
      package require Thread
      set i 1
      while { 1 } {
        set id [thread::create {thread::wait}]
        thread::send -async $id {thread::unwind}
        puts -nonewline " $i "
        flush stdout
        update
        incr i
      
      }
      
      
    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: "nobody"
    9. subsystem initialized to: "80. Thread Package"
    10. title initialized to:
      thread::release on win32 does not release all memory
      
    11. type initialized to: "Bug"
  2. Ticket change [a597257561] (rid 110400) by vasiljevic on 2006-08-06 16:02:21:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      Hi!
      
      This is I believe the side-effect of the thread memory allocator
      which is known to be memory greedy as it was optimized on
      speed and not memory usage. I have seen this behaviour on 
      all Unices as well, not only Windows. Although it seems that on
      Unices is far less visible. I'm able to create and terminate about
      30.000 threads and the VM usage increases about 1MB.
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  3. Ticket change [cad88ddea7] (rid 95430) by vasiljevic on 2007-06-30 22:37:00:

    1. icomment:
      Logged In: YES 
      user_id=95086
      Originator: NO
      
      I will still leave this open but will try to replace
      the greedy Tcl memory allocator with just calls
      to regular system allocator and see if this helps. 
      If yes then we can think of making an alternate 
      allocator for Tcl OR even just simple use the 
      system-level one as those beasts are more
      thread-aware today as they have been 5 year ago.
      
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. resolution changed to: "Remind"
    5. username: "vasiljevic"
  4. Ticket change [5da43b3e3c] (rid 115508) by vasiljevic on 2010-09-29 03:07:50:

    1. icomment:
      Perhaps this is a problem related to memory leak in the teardown logic.
      I will need to investigate the memory leak problem first.
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  5. Ticket change [c3567d67b0] (rid 111641) by dgp on 2012-04-24 21:43:30:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2012-04-24T14:43:30"
    3. closer changed to: "dgp"
    4. icomment:
      Testing the trunk (2.6.8) and thread-2-7-branch (2.7b1)
      on Linux with the submitted test scripts I see no leaks
      with the Tcl trunk.
      
      Would be good for someone to confirm on Windows.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Out of Date"
    8. status changed to: "Pending"
    9. username: "dgp"
  6. Ticket change [593672913e] (rid 117938) by sebres on 2012-04-24 22:23:54:

    1. icomment:
      I could also not reproduce it on linux, but in windows.
      see also bug 3493120: https://sourceforge.net/tracker/?func=detail&aid=3493120&group_id=10894&atid=110894
      Possible the same bug?
      Have a linux kernel any "garbage collector" for therminated threads, its shared memory or something else?
      
      
      
    2. login: "sebres"
    3. mimetype: "text/plain"
    4. username: "sebres"
  7. Ticket change [5e9b3febf3] (rid 115666) by dgp on 2012-04-24 22:37:04:

    1. icomment:
      ok then
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. resolution changed to: "None"
    6. status changed to: "Open"
    7. username: "dgp"
  8. Ticket change [25453101a7] (rid 88143) by dgp on 2012-11-14 03:56:41:

    1. assignee changed to: "mistachkin"
  9. Ticket change [a861997533] (rid 98981) by dgp on 2012-11-20 01:59:26:

    1. icomment:
      Joe, did we decide this one is out of date?
      
      That is, the leak problems on Windows are
      already fixed?  Thanks for closing this ticket
      if you confirm.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Ticket change [54810d341d] (rid 93958) by mistachkin on 2012-11-20 03:20:57:

    1. icomment:
      Used the provided test script on Windows 8 and created 16K threads.  Total memory used by the process was around 2MB.  Therefore, no leak.
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  11. Ticket change [96e95dabfc] (rid 106413) by mistachkin on 2012-11-20 03:22:02:

    1. closedate changed to: "2012-11-19T20:22:02"
    2. closer changed to: "mistachkin"
    3. foundin changed to: "obsolete: 8.4.19"
    4. icomment:
      
      
      allow_comments - 1
      
      
      
    5. login: "mistachkin"
    6. mimetype: "text/plain"
    7. resolution changed to: "Out of Date"
    8. status changed to: "Closed"
    9. username: "mistachkin"