Multithreaded C# application, Visual Studio 2008, Windows XP, Framework 3.5 SP1.
This application is a little crawling utility to download pages from our website, extract some information and upload it into a database. It runs for a while, then somewhere between about 10 minutes and an hour in, it locks up totally, user interface and
all. When I try to "break all" in the VS debugger, I get a message "cannot break execution".
Now the confusing thing about this is that since the UI was locking up, I thought that some deadlock must be happening on the main UI thread. So I started stripping out any code and locks that were being acquired on that thread that might cause problems
... until there was nothing left. Even with the window simply spawning a bunch of worker threads on create, then totally forgetting about them and giving no reverse access, the lockup still happens, the UI still freezes and VS still can't break the execution.
There are 10 threads to do the crawling, and one each to do the processing and the uploading. The next thing I did was take out the uploading entirely to remove the possiblity of a deadlock in the SqlClient libraries. No difference. So now, the only things
that could be really deadlocking the main thread that I can see are the centrally created HTTPWebRequest objects I'm using. WebRequest.create is supposedly thread safe
View Complete Post