0

One of my threads in the process is burning one CPU core to the full extent. 8 cores, 12,5% CPU used. Look at this (procexp screenshot)

http://dl.dropbox.com/u/10020780/scr1.PNG

Another thing that bothers me it Start Address of 0x0!?!?

I am trying to find the thread in the list provided with the VS2008 Thread View, but not a single thread there (or I have overlooked) has a tight loop (without Sleep()) or a clear indication of trouble.

Any hints?

CASE UPDATE:

It seems like I'm beyond my code realm on this one; I'll post a pictures obtained with STACK button, so you can maybe have some hunch on the issue at hand.

First situation

http://dl.dropbox.com/u/10020780/smallstack.PNG

Second situation (same thread, I get this two alternating)

http://dl.dropbox.com/u/10020780/largerstack.PNG

Guys, where am I? I do use Windows Media, Sockets, ...

Daniel Mošmondor
  • 19,718
  • 12
  • 58
  • 99
  • Try hitting the `Stack` button at the bottom right and see what code it's actually executing. – Anon. Feb 09 '11 at 20:14
  • 1
    Or pause debugging and look where it stops. It will be likely in the more called part of the code – digEmAll Feb 09 '11 at 20:18
  • @digEmAll: I'm doing just this with no success :| – Daniel Mošmondor Feb 09 '11 at 20:21
  • @Daniel: Strange, it has worked many times for me. Well, now I'd try to use a profiler and look at the method taking the most of the processing time. – digEmAll Feb 09 '11 at 20:32
  • 1
    You will also need to get the windows debug symbols in order to get meaningful call stacks on your threads... see http://support.microsoft.com/kb/311503 as one starting point. – Chris O Feb 09 '11 at 20:33
  • @digEmAll: can you suggest one? – Daniel Mošmondor Feb 09 '11 at 20:35
  • @Daniel: Have a loot at this [Q&A](http://stackoverflow.com/questions/10644/any-decent-c-profilers-out-there). – digEmAll Feb 09 '11 at 20:55
  • @Daniel: BTW, do you pass a lot of non-resolved (I mean without `ToList()` etc...) LINQ queries through you program methods ? Sometimes the deferred nature, and the extreme simplicity to chain one quey to another, can lead to a very long execution when you actually resolve it (in particular if the result is `O(n^3 or n^4)`). – digEmAll Feb 09 '11 at 20:56
  • Thx for the try - but no LINQ in this software... :| – Daniel Mošmondor Feb 09 '11 at 20:58
  • You really should download the debug symbols in the debugger as Chris suggests. In 2008 this is really easy as the symbol server url is already preconfigured. Right-click in the callstack, and select "load symbols". You may need to repeat for every DLL. –  Feb 09 '11 at 22:12
  • And I also wonder, if you suspend the thread, does your app behave differently? –  Feb 09 '11 at 22:15

2 Answers2

1

have you tried to take a hang dump with Adplus, and running the !runaway commnand in WinDbg ? this will show you for sure what thread, and then you can use !clrstack to get what the thread aws doing.

Menahem
  • 3,974
  • 1
  • 28
  • 43
0

Humph - after lot of headbanging, I figured out that (I should do that sooner) thread id from procexp can be found inside visual studio as well - and found the thread that caused the problem. It was tight loop, that I resolved with Sleep(10).

Daniel Mošmondor
  • 19,718
  • 12
  • 58
  • 99