Re: Thread mysteriously terminates.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sean Wolfe (noemail_at_please.com)
Date: 02/27/04


Date: Thu, 26 Feb 2004 20:57:34 -0600

Some additional data on this issue. When the application that is feeding
into the "aggregator" class is throttled to about 1/4 of the load i
described, the issue doesn't happen, or happens less. It also seems to
happen on multi-proc HT emabled machines, and not single proc(I haven't
seen it at least). I haven't tried it on Multi-Proc NonHT machines or
Single Proc HT machines. That's my next step though.

I looked that the thread in systernals.com Process Explorer, and it
looks like the Thread somehow gets dereferenced under those higher
loads. When it looses the thread, the thread still appears in the list
of handles, but only has one reference. Most .NET threads has 3-4
references if not more. If i select properties for the Process, and then
view the Threads tab, the thread is no longer in the list (it does
appear when the thread is operating properly). So it would seem that the
thread has terminated or lost it's reference, but it's handle hasn't
been released. Did the GC maybe mistakenly collect this thread? that
would seem unusual since I'd see this thread object to appear as a Root
node in the GC Heap.

Also to note, I do have a method attached to the AppDomain's
UnhandledException event. So if there were any excpetions that slipped
through my class this should be able to catch it.

I also had put a Debug message just outside of the main while
threadloop, in case for some reason it had been able to exit out of
there for some reason. That expression is never called, so I know it's
not that the thread is somehow getting out of the loop.

This one is a puzzler!

Sean



Relevant Pages

  • Re: Programmatic GUI pushbutton callback
    ... is there any reason why I should be ... setting properties is this ... you only need to load "handles" at the start of ... functions that will need to reference it, ...
    (comp.soft-sys.matlab)
  • Adding Library Reference Through Code
    ... How do I load in a library reference through VBA code (be it loading a ... module or a reference to a another file containing the code needed). ... the code should also check if what I am loading has ... The reason is that I have many functions which I use very often and ...
    (microsoft.public.office.developer.vba)
  • Re: Adding Library Reference Through Code
    ... How do I load in a library reference through VBA code (be it loading a ... module or a reference to a another file containing the code needed). ... the code should also check if what I am loading has ... The reason is that I have many functions which I use very often and ...
    (microsoft.public.office.developer.vba)
  • Re: order of class load and object allocation
    ... Do you have a reason to believe otherwise? ... it seems that a value could be stuffed into a reference ... variable without having to load a class first. ...
    (comp.lang.java.programmer)
  • Re: do_raw_spin_lock using a lot of the system cpu time
    ... machines spiked in load. ... I'm also seeing this on 3 different kernels: ... Provide a free area cache for the vmalloc virtual address allocator, ...
    (Linux-Kernel)