100% CPU in vbc.exe when compiling large vb.net web applications in Microsoft Visual Studio 2008

We just released a hotfix for an issue where you get 100% CPU in vbc.exe when compiling large applications in Microsoft Visual Studio 2008.

Apart from the 100% CPU situation you may also notice symptoms like visual studio taking a very long time to return or error messages like

Error    246    Timed out waiting for a program to execute.
The command being executed was “C:WindowsMicrosoft.NETFrameworkv3.5vbc.exe” /noconfig @”C:TempFilesMyApp8ec39ce7e41b4e32gpznqwbu.cmdline”.


C:MyProjectsMyPage.aspx(4): Build (web):
Object ‘/32eba493_7a69_40af_bfe6_52887ab07396/jdkqqpvt_pufe5n+ogossdnv_258.rem’ has been disconnected or does not exist at the server.

The issue will not appear if you set debug=”false” in web.config.

The reason for this issue is that vbc.exe (the vb.net compiler) is spending a lot of time compiling and copying pdb files (symbol files) and to confirm that you are running into this issue you can take a hang dump with adplus (adplus -hang -pn vbc.exe) while vbc.exe is running at high CPU.  If you open it up in windbg.exe and set up the symbols correctly (.symfix c:websym) and then run ~* kb to list all stacks, you should see a stack similar to the following:

0:000> kb 2000
ChildEBP RetAddr  Args to Child             
0023ed84 00cc1b80 08a10cdc 0023f228 08a11bfc vbc!BCITER_CHILD::GetNext+0x4a
0023edbc 00cc1ad8 08a11bfc 08a10ec0 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x237
0023edf8 00cc1ad8 08a10cdc 088a10a4 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023ee34 00cc1ad8 088a0ec0 087e1288 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023ee70 00cc1ad8 087e10a4 088a146c 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023eeac 00cc1ad8 088a1288 087611ac 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023eee8 00cc1ad8 08760fc8 088310c0 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023ef24 00cc1ad8 08830edc 07c21488 0023f228 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023ef60 00cc1ad8 07c212a4 099717d4 0043a7b0 vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023ef9c 00d0c588 08cb0144 009353ec 00d0c68d vbc!PDBExtensionTypeIterator::FindExtensionsFromNamespace+0x22f
0023efa8 00d0c68d 8c83e39e 099717d4 00469a40 vbc!PDBExtensionTypeIterator::PopulateExtensionTypes+0x1c
0023f388 00d0c327 009353ec 099717d4 8c83e3ee vbc!PEBuilder::WritePDB2+0x10c
0023f3f8 00d0c554 009353ec 00000000 0023f686 vbc!PEBuilder::WritePE+0x380
0023f4f8 00d1eeb2 00000000 0023f686 0023f51c vbc!PEBuilder::Compile+0x3ea
0023f688 00d1ecce 000000e8 07643fe8 009385d4 vbc!CompilerProject::_PromoteToCompiled+0x7e
0023f6a0 00d1f0c4 8c83e716 00000001 001247f0 vbc!CompilerProject::CompileFromBoundToCompiled+0xd3
0023f700 00d41a9e 00430268 0023f750 0023f74c vbc!Compiler::Compile+0x139
0023f760 00d41cd6 00000003 00469ad0 00123e00 vbc!wmain+0x23f
0023f7a4 7587e3f3 7efde000 0023f7f0 773acfed vbc!`vector constructor iterator’+0x184
0023f7b0 773acfed 7efde000 54d0fe52 00000000 kernel32!BaseThreadInitThunk+0xe
0023f7f0 773ad1ff 00d54b2e 7efde000 ffffffff ntdll!__RtlUserThreadStart+0x23
0023f808 00000000 00d54b2e 7efde000 00000000 ntdll!_RtlUserThreadStart+0x1b

The fix involves two hotfixes (KB 951708 for Visual Studio 2008, and KB 953595 for vbc.exe). The KB articles will be published soon but even though the KB articles are not yet published you can still get these hotfixes by contacting support and supplying the kb article numbers 951708 and 953595. 



Comments (15)

  1. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Greg Duncan announced the release of SlickEdit Tools 2.0.2 . Channel 9 Stuff: This Week on Channel 9: Clint Rutkas stops by, Project

  2. Thorne says:

    How do I/we get the hot fixes for this problem without paying for it?

    KB 951708 for Visual Studio 2008, and KB 953595 for vbc.exe

    Free they should be…..

  3. molotov says:

    > The KB articles will be published soon

    The KB articles are now available.



  4. Thorne says:

    Hard you may be trying, but my system is still dying…..

    There are no hot links on these pages for downloaing the files and the files are what is needed.

  5. Thorne says:

    Hard you may be trying, but my system is still dying…..

    There are no hot links on these pages for downloading the files and the files are what is needed.

  6. molotov says:

    Were I replying directly to you would I have so said. ;-)

  7. molotov says:

    …but presumably you’ve seen the post Tess linked to:

    How do I get a hotfix for .net or Visual Studio? @ http://blogs.msdn.com/tess/archive/2008/05/09/how-do-i-get-a-hotfix-for-net-or-visual-studio.aspx

    Might you indicate why the described technique will not work for you?

  8. Thorne says:

    Thanks for the response.

    I have been led to believe the fixes are as simple as applying KB953595 and KB951708 which are as the articles you mentioned, files.

    If these files were available to download I would do so. None of the pages you or Tess have indicated have these particular files on them as downloadable links.

    I see the description of the files but alas no link to download.

    What praytell might I be doing wrong?

    Sometimes it is just the way I am holding my mouse, hopefully it is once again a failure of a rodent nature.

  9. molotov says:

    These fixes would currently seem to fall into the class that Tess mentions in the aforementioned post:

    "If the particular hotfix you are looking for (like this one) is not available there, you need to open a support case and the reason for this is that we want to keep track who gets certain hotfixes in case there is an issue that we need to inform the customers about.   If you open a support case to get a hotfix this case will of course be free of charge…"

    Sometimes, the hotfix becomes available for download at a later date, directly from the KB Article that discusses the hotfix.

  10. molotov says:

    … and, in case you have not seen it, Tom has recently made this post:

    Hotfixes on Code Gallery @ http://blogs.msdn.com/tom/archive/2008/07/01/hotfixes-on-code-gallery.aspx

    It seems to be a change to the way hotfixes that were previously made available (leaving the "Visual Studio and .NET Framework Public Availability Program" on Connect [as Tess wrote about], in favor of the MSDN Code Gallery).

    But, as you may expect, the 951708 and 953595 hotfixes are not currently available in either place…

  11. Thorne says:

    Actually that is not what I would expect and I am curious as to why you might think I would expect it.

    I also would not expect to have to open a support call and supply a credit card to get these "Bug" fixes for a product I already paid for.

    Alas, I guess I shall be relagated to working on bits of code and running a "Once Daily" full build.  "Shades of the 1990’s"

    I’ll check back from time to time to see if the magic files suddenly become available to the rest of us.

  12. molotov says:

    I would expect that you would expect it, as you stated "None of the pages you or Tess have indicated have these particular files on them as downloadable links. "  So, here’s another page where you are not able to download the referenced hotfixes from. :-)

    FWIW, I’ve previously acquired a hotfix from PSS (not related to the .NET FW / VS) and do not recall needing to supply a credit card number to do so.  The hotfix was provided rapidly, the followup was amazing, and the hotfix resolved the issue.

    So it seems the options for obtaining these hotfixes are currently to wait, or open a support case.

  13. Tess says:

    even if you open a support case and provide a credit card number you will not be charged if the only purpose for the case is to obtain the hotfix.

    If however the hotfix does not apply to your situation and you need more help to resolve the issue at hand then you would be charged if you choose to continue with the case.

  14. molotov says:

    Thanks for clarifying, Tess.  It seems there is a lot of confusion around that aspect of support cases, and it is seldom expressed in such a clean fashion.

  15. jhonM says:

    is there a simple tips to fix this problems?