I have a .NET 3.5 client/server application that is accessed via RDP on a local network running on a windows 2003 server. When using one portion of the product, the screen freezes periodically when none of the code I've written is actually executing. I've run a profiler on the server using the latest source code, etc. and when the delay happens (10 second delay), there is no processor time being used, and no code of mine executed.
Using the Profiler I found a Stack Trace beginning with the generic Threading.ThreadHelper.ThreadStart() method. It doesn't tell me what originated the method call, and until I know that I don't know how I'm going to find what's gone wrong. The sta开发者_运维技巧ck trace follows down through methods such as System.Net.ServicePoint.ReleaseAllConnectionGroups() and System.Net.Sockets.Socket.Close(int timeout). We use web service calls, but none of them are asynchronous and none of them are being called anywhere near the time of the delay.
There is a delay caused by some kind of network timeout, but I can't tell from where I'm originating the call. I'm hoping if I can determine where the Threading... method originates, I can figure out what's going wrong. I have no idea where to start.
Don't look at a thread you didn't start, that one can't freeze the window updates. Look at your main thread, find out what it is blocking on. If that doesn't help, post the actual stack trace of that thread in your question instead of describing it.
Apart from the OP's reasons for asking this question I was able to see the stack trace of the original thread using Visual Studio's Threads
window accessible through main menu:
Debug->Windows->Threads
精彩评论