Home > Computers and Internet > Using the Concurrency Visualizer to find Explorer hangs

Using the Concurrency Visualizer to find Explorer hangs

At work on my Windows 7 computer, sometimes when I search in Explorer the Explorer window will hang. Wanting to know why I used the Visual Studio 11 Beta Concurrency Visualizer. In Visual Studio 11 (which is probably going to be named Visual Studio 2012) I went to Analyze -> Concurrency Visualizer -> Attach to Process.. and selected Explorer. Once the trace window showed that it was collecting I opened an Explorer window and started to search. By the time I hit the seventh character Explorer hung. When it was done hanging I stopped the trace collection and viewed the report in Visual Studio. Below is a screen shot of the Threads View:

Threads View Even though it’s not labeled Main Thread, thread 6980 looks like the driving thread. What makes me suspect this is how it was the only thread doing UI work, plus noticeable amounts of execution. In addition, when it was switching between UI and Execution work the Disk was doing reading work. Looking at the middle of the 6980 thread I see there’s a long blocking section; 29.6 seconds long to be exact. That section is released by thread 4584 which blocking for 29.6 seconds too. Looks like the driving thread called for another thread to do work and blocked waiting for the result. Clicking on that blocking segment I see:

4584 is blocked on an LPC (a Local Procedure Call, which is something processes use to communicate with each other). Exactly which process it’s communicating too, I don’t know. While it is possible to open the underlying etl file and discover which one, that’s not needed to solve this problem. Looking at the call stack of the blocking LPC I see an assembly name of searchfolder, and I see class name of OfflineFilesCache with a FindItem method. Offline Files! I don’t use Offline files. At least I don’t think I do.

Pressing the Windows key on my keyboard and typing “offline” the top results are all entries for managing Offline Files. Opening those I find that my computer is configured for storing Offline Files. Suspecting this is the cause for the Explorer hangs I Disable Offline Files for the computer. Ever since then Explorer has never hung while searching. The result of this investigation: to solve a 30 second Explorer hang in Windows 7, disable Offline Files.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: