Mar 27, 2012

A way to fix freezing WMI

Problem symptoms (as on my Windows Server 2008 R2 Standard x64), after reboot you have following problems:
  1. WMI functions are unacessible. For example, if you try to start "SQL Server Configuration Manager" (which uses WMI internally) it will fail to lauch with error. Other programs just won't start or freeze indefinetely;
  2. svchost.exe process which hosts "Windows Management Instrumentation" service (Winmgmt) will use 100% of single CPU core time;
  3. HDD led will glow constantly;
  4. If you wait for some time (some hours) all previous symptoms disapper and everything functions normally until next reboot.
My solution was to:
  1. Load into "Safe mode";
  2. Kill svchost.exe in question via Task Manager, and then quickly;
  3. Delete "%systemroot%\System32\wbem\Repository" folder;
  4. Reboot.
Again you need to perform steps 2 and 3 quickly, since Windows will restart "Winmgmt" service shortly after it was killed, and running "Winmgmt" blocks deletion of this folder.

After this procedure Windows will recreate this folder and symptoms described above will stop. I think this folder is some kind of cache, which becomes either corrupted (more likely) or very large and WMI service enters some kind of almost infinite loop on booting then processing this folder data. As an interesting fact "Repository" folder which I deleted on my system was 559Mb, while recreted folder is 22Mb which is 25 times difference.

No comments:

Post a Comment