Artifacts Associated With Ticket 597924ffffffffff
Ticket change [d23f7d35fb] (rid 113503) by msofer on 2002-08-20 20:06:32:
- assignee initialized to: "vasiljevic"
- cmimetype initialized to: "text/plain"
- 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
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "80. Thread Package"
- title initialized to: "threading leak?"
- type initialized to: "Bug"
Ticket change [3ba2285b8a] (rid 112779) by msofer on 2002-08-21 03:06:32:
- icomment:
File Added - 29458: crash.tcl
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Add attachment "crash.tcl" [d425d1f585] (rid 123403) by msofer on 2002-08-21 03:06:32.
Ticket change [e7e327f748] (rid 104551) by msofer on 2002-08-21 04:15:00:
- 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.
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- title changed to: "win: "Can't create a new thread""
- username: "msofer"
- icomment:
Ticket change [ee7a5c9064] (rid 104089) by andreas_kupries on 2002-08-21 04:53:37:
- 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.
- login: "andreas_kupries"
- mimetype: "text/plain"
- title changed to: "win: "Can't create a new thread""
- username: "andreas_kupries"
- icomment:
Ticket change [63af2700c6] (rid 92620) by juliannoble on 2002-08-22 05:36:18:
- 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.
- login: "juliannoble"
- mimetype: "text/plain"
- username: "juliannoble"
- icomment:
Ticket change [5730535a20] (rid 94440) by msofer on 2002-08-24 19:08:01:
- 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]" } - login: "msofer"
- mimetype: "text/plain"
- title changed to: "win: "Can't create a new thread""
- username: "msofer"
- icomment:
Ticket change [3344f90ee1] (rid 106556) by juliannoble on 2002-08-28 02:21:18:
- 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.
- login: "juliannoble"
- mimetype: "text/plain"
- username: "juliannoble"
- icomment:
Ticket change [2bbfb3e8f1] (rid 118794) by juliannoble on 2002-08-28 02:32:51:
- 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.
- login: "juliannoble"
- mimetype: "text/plain"
- username: "juliannoble"
- icomment:
Ticket change [cd368a560d] (rid 95853) by juliannoble on 2002-08-29 00:42:42:
- 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.
- login: "juliannoble"
- mimetype: "text/plain"
- username: "juliannoble"
- icomment:
Ticket change [e06de7158a] (rid 115191) by vasiljevic on 2002-08-29 16:35:19:
- 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.
- login: "vasiljevic"
- mimetype: "text/plain"
- title changed to: "win: "Can't create a new thread""
- username: "vasiljevic"
- icomment:
Ticket change [c6cd5ce8b0] (rid 121830) by davygrvy on 2002-11-19 15:17:04:
- 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.
- login: "davygrvy"
- mimetype: "text/plain"
- title changed to: "win: "Can't create a new thread""
- username: "davygrvy"
- icomment:
Ticket change [3f2e373f51] (rid 121413) by davygrvy on 2002-11-21 15:13:04:
- 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 :)
- login: "davygrvy"
- mimetype: "text/plain"
- title changed to: "win: "Can't create a new thread""
- username: "davygrvy"
- icomment:
Add attachment "patch.txt" [d40d1bf7d1] (rid 123383) by davygrvy on 2002-11-21 15:13:04.
Ticket change [caef9849e1] (rid 95443) by davygrvy on 2002-11-21 15:13:05:
- icomment:
File Added - 35840: patch.txt
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [7f8beb276d] (rid 97577) by davygrvy on 2002-11-21 15:24:45:
- subsystem changed to: "25. Channel System"
- title changed to: "win: "Can't create a new thread""
Ticket change [15d7176f44] (rid 124631) by davygrvy on 2002-11-27 05:52:19:
- closedate changed to: "2002-11-26T22:52:19"
- closer changed to: "davygrvy"
- 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?
- login: "davygrvy"
- mimetype: "text/plain"
- status changed to: "Closed"
- title changed to: "win: "Can't create a new thread""
- username: "davygrvy"