SymbolSource health monitoring

Those of you who follow me on Twitter (@TripleEmcoder) will already now this, but I'd like to share a few more details in this post: we've implemented an automated end-to-end test and scheduled it to run every hour. If anything goes wrong we'll be able to detect and fix it much faster than before.

The scenario is as follows:

  1. Find the most recent version of the test package on nuget.org.
  2. Create a simple C# project with a few files.
  3. Modify one of those files with a comment stating the next version.
  4. Use nuget.exe pack command to compile the project and build a package (with -symbols to generate a package for SymbolSource).
  5. Upload both packages to nuget.org and symbolsource.org, accordingly.
  6. Download and extract the package from nuget.org into a separate folder.
  7. Run Debugging Tools for Windows (this uses the same components as Visual Studio) to make sure that symbols for the package can be downloaded from symbolsource.org.
  8. Verify that the downloaded PDB file contains refernces to all source files used to build the test library, that they can be downloaded from SymbolSource and that their content has not been corrupted in any way.

There is an interesting thing to note by anyone who uses symbol server support in Debugging Tools for Windows - cdb.exe, symchk.exe or symsrv.dll. If you try to use any of those while running as a service (like we did, running the test scenario in CruiseControl .NET), web requests will not be made using the regular WinINET stack, but WinHTTP. There is an interesting catch with the latter one, having a default bogus HTTP proxy configured. You need to either reconfigure WinHTTP to use your own proxy or disable proxying in the registry. This equals to setting the following keys:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Symbol Server]
"NoInternetProxy"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Symbol Server]
"NoInternetProxy"=dword:00000001

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Symbol Server]
"NoInternetProxy"=dword:00000001

[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Symbol Server]
"NoInternetProxy"=dword:00000001

To experience this behavior in your own account, set this environment variable:

SET DBGHELP_WINHTTP=AnythingOtherThanEmpty

You can test this with the commands described in my previous post on Veryfing symbols after upload to SymbolSource.

For more info on the WinHTTP issue check out these links:

Posted by Marcin Mikołajczak (TripleEmcoder) on Tuesday, July 26, 2011

blog comments powered by Disqus