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

History Of Ticket 597924ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 597924ffffffffffffffffffffffffffffffffff

  1. Ticket change [d23f7d35fb] (rid 113503) by msofer on 2002-08-20 20:06:32:

    1. assignee initialized to: "vasiljevic"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      From clt: 
      
      [cygwin on WinNT]
      
      The script below (attached) seems to crash reliably for
      me after somewhere around 340 iterations.  In the
      project where I found the problem (much too big and
      messy be of much use in diagnosis I think), I was
      creating threads at much greater intervals (e.g 30
      seconds) and getting crashes with fewer iterations than
      in this test script, so maybe it is just related to the
      memory leaks.
      
      I've yet to try checking out new code and recompiling.
      
      Cheers,
      Julian
      
      
      
      
    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: "msofer"
    9. subsystem initialized to: "80. Thread Package"
    10. title initialized to: "threading leak?"
    11. type initialized to: "Bug"
  2. Ticket change [3ba2285b8a] (rid 112779) by msofer on 2002-08-21 03:06:32:

    1. icomment:
      
      
      File Added - 29458: crash.tcl
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  3. Add attachment "crash.tcl" [d425d1f585] (rid 123403) by msofer on 2002-08-21 03:06:32.

  4. Ticket change [e7e327f748] (rid 104551) by msofer on 2002-08-21 04:15:00:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Andreas succesfully reproduce the crash under strange
      circumstances: it will only crash with "Can't create a new
      thread"  if the Windows Task Manager is open. Memory reqs
      are fairly constant, there doesn't seem to be a leak there.
      
      This was built using cygwin for configure/make, compiled
      with MSVC++. The new allocator was *not* used.
      
      My guess is that the mingw build of the original report was
      hitting both this bug and also the new allocator bug #597936.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. title changed to: "win: "Can't create a new thread""
    6. username: "msofer"
  5. Ticket change [ee7a5c9064] (rid 104089) by andreas_kupries on 2002-08-21 04:53:37:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Update: I got crashes without Windows Task Manager now 
      too, but in much higher ranges: 1691 iterations for example.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. title changed to: "win: "Can't create a new thread""
    5. username: "andreas_kupries"
  6. Ticket change [63af2700c6] (rid 92620) by juliannoble on 2002-08-22 05:36:18:

    1. icomment:
      Logged In: YES 
      user_id=598324
      
      CVS'ed with the tag HEAD a few hours ago and rebuilt 
      tcl and thread - problem still exists, though now 
      consistently getting slightly higher iterations from the 
      crash.tcl script than before,  400 - 600 though this may 
      well be related to a drop in the number of other apps 
      running on my machine.
      used mingw, configured as follows:
      tcl:   --enable-threads --prefix=e:/tcl
      thread: --enable-threads  --with-tcl=e:/tcl/lib --
      prefix=e:/webpub/pvt/pcm_sys/tcl
      
      Error occurs on both dual & single CPU machines - also 
      occurs in thread2.2 
      One time I got 3 junk characters as final output from 
      the test script instead of the usual "can't create a new 
      thread" error being raised. I don't know if it's even 
      slightly relevant, but the chars were a rightwards 
      pointing triangle,r & I.
      
      
    2. login: "juliannoble"
    3. mimetype: "text/plain"
    4. username: "juliannoble"
  7. Ticket change [5730535a20] (rid 94440) by msofer on 2002-08-24 19:08:01:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Is this dependent on the async mechanism? What happens with
      
      package require Thread
      set i 0
      while 1 {
          thread::create "puts [incr i]"
      }
      
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. title changed to: "win: "Can't create a new thread""
    5. username: "msofer"
  8. Ticket change [3344f90ee1] (rid 106556) by juliannoble on 2002-08-28 02:21:18:

    1. icomment:
      Logged In: YES 
      user_id=598324
      
      No, the simple while loop gives the same "can't create 
      new thread" error.
      
      For some reason I seem to be able to run the line:
      thread::create "puts xxx"
      interactively as many times as I want after the while 
      loop has terminated... 
      Try to run it in a for or while loop again - and it 
      performs one iteration only.
      
      
    2. login: "juliannoble"
    3. mimetype: "text/plain"
    4. username: "juliannoble"
  9. Ticket change [2bbfb3e8f1] (rid 118794) by juliannoble on 2002-08-28 02:32:51:

    1. icomment:
      Logged In: YES 
      user_id=598324
      
      hmm.. after running the while loop... it gives an error at 
      around iteration 350 or so.
      Then I can interactively run:
      thread::create "puts x"
      as many times as I want, but then if I run:
      thread::create "puts x; thread::wait"
      I can no longer run thread::create "puts x"  at all without 
      the error.
      
      
      
    2. login: "juliannoble"
    3. mimetype: "text/plain"
    4. username: "juliannoble"
  10. Ticket change [cd368a560d] (rid 95853) by juliannoble on 2002-08-29 00:42:42:

    1. icomment:
      Logged In: YES 
      user_id=598324
      
      worse news... I've now received the "can't create a new 
      thread" error from an application that uses a simple 
      pool of 3 threads instead of continually creating and 
      destroying.  
      The application had simply stalled without apparent 
      error, and when I typed thread::create "puts test" at the 
      prompt I got the error. 
      The pool is extremely simple - there should usually be 
      at most 2 threads in use, and after the initial pool 
      creation it doesn't use thread::create at all.  It just has 2 
      timers that every 30 seconds send a message to the 
      first free thread to do a traceroute.  This may also be the 
      source of a mystery error in another app I have where 
      after hours of use it just stops communicating with 
      another process.
      
      
    2. login: "juliannoble"
    3. mimetype: "text/plain"
    4. username: "juliannoble"
  11. Ticket change [e06de7158a] (rid 115191) by vasiljevic on 2002-08-29 16:35:19:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      URKS? traceroute??? 
      Can you please avoid any execs in the worker thread 
      and see if the error persists? 
      I'm sorry for all this fuss, but It seems to me that we're  
      hitting some other, thread-unrelated, problem. 
       
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. title changed to: "win: "Can't create a new thread""
    5. username: "vasiljevic"
  12. Ticket change [c6cd5ce8b0] (rid 121830) by davygrvy on 2002-11-19 15:17:04:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      Seems to be related to the console channel driver as far as I 
      can tell.  I think it's rather odd that there is a reader and writer 
      thread for it when a console handle is already a waitable 
      object...  I cleaned-up the exit condition so TerminateThread() 
      is avoided, and noticed a marked improvement, but this 
      needs more study.
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. title changed to: "win: "Can't create a new thread""
    5. username: "davygrvy"
  13. Ticket change [3f2e373f51] (rid 121413) by davygrvy on 2002-11-21 15:13:04:

    1. icomment:
      Logged In: YES 
      user_id=7549
      
      The attached patch seems to fix the problem :)
      
      All win channel drivers had a good 'going over' to make sure 
      they cleanly exit their worker threads.
      
      Does this fix the problem for you guys, too?  Like Julian, I 
      witnessed the same lock-ups, but couldn't put my finger on 
      exactly where it was coming from.
      
      Following my instinct, I looked at how the standard channels 
      where initialized/shutdown in each thread created.  I noticed 
      that in the shutdown phase the reader and writer threads 
      (console channel driver) where terminated rather than allowed 
      a clean exit.  Knowing this was a big problem in the pipe 
      driver for the read thread, I followed the same structure and 
      made all worker threads the same.
      
      Now I don't get the lock-up.  process handle count is stable 
      all the way to 2000 and probably beyond, but didn't want to 
      wait around.  Thread count doesn't grow either which means 
      all handles are being recycled properly :)
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. title changed to: "win: "Can't create a new thread""
    5. username: "davygrvy"
  14. Add attachment "patch.txt" [d40d1bf7d1] (rid 123383) by davygrvy on 2002-11-21 15:13:04.

  15. Ticket change [caef9849e1] (rid 95443) by davygrvy on 2002-11-21 15:13:05:

    1. icomment:
      
      
      File Added - 35840: patch.txt
      
      
      
    2. login: "davygrvy"
    3. mimetype: "text/plain"
    4. username: "davygrvy"
  16. Ticket change [7f8beb276d] (rid 97577) by davygrvy on 2002-11-21 15:24:45:

    1. subsystem changed to: "25. Channel System"
    2. title changed to: "win: "Can't create a new thread""
  17. Ticket change [15d7176f44] (rid 124631) by davygrvy on 2002-11-27 05:52:19:

    1. closedate changed to: "2002-11-26T22:52:19"
    2. closer changed to: "davygrvy"
    3. icomment:
      Logged In: YES 
      user_id=7549
      
      Patch committed to HEAD as what the patch fixes is "a good 
      thing".  I don't know if this fixes this issue entirely.
      
      Could someone do a fresh update and let me know?
      
      
    4. login: "davygrvy"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. title changed to: "win: "Can't create a new thread""
    8. username: "davygrvy"