Microsoft debugging symbols caching proxy using FastEndpoints and MongoDB.
When working frequently with WinDbg to analyze kernel memory dumps, symbol (down)loading is a widespread occurrence. What's also quite common is the abysmal performance of the official Microsoft Symbol Servers, taking easily between two to three seconds for every request! Being fed up with wasting precious lifetime I made this little caching proxy you can put in between your WinDbg instances and use it in conjunction with an offline caching directory. The proxy server will store a copy of the requested symbol in a MongoDB database, including information if the symbol even exists upstream. This information gets cached for a week, so you won't waste any more time twiddling thumbs while the Microsoft servers take their sweet time to return a 404.
Let's see if my efforts paid off, shall we! I've opened a kernel memory dump which requested 1090 files at a total size of 186 Megabytes with three different strategies outlined below. Let's go!
12 minutes, 17 seconds. Abysmal and shameful! π
1 minute, 20 seconds. Whoa, we're getting somewhere! π
48 seconds. Heck yeah! π₯³
I'm hosting an instance of this project at https://symbols.nefarius.at/
which you can
consume and help grow by adjusting your symbol source settings like so:
.sympath cache*D:\symbols;srv*https://symbols.nefarius.at/download/symbols
This means my local symbol cache resides at D:\symbols
, adjust to your own preferences.
Like any other of my public web services, it only logs an absolute minimal amount required for debugging purposes, and I'll never sell your data out to the big bois π
If you like this idea and want to keep my public instance happy, up and running consider making a donation πΈ
- Caching! Pretty much the main purpose π
/download/symbols/{Symbol}/{SignaturePlusAge}/{File}
- Serves the typical download request which the debugger issues.
- Badges! Embed server statistics anywhere via generated SVGs πΌοΈ
/api/badges/cachedSymbolsTotal
- Returns the total number of cached records.
/api/badges/cachedSymbolsFound
- Returns the number of records found upstream (these actually contain the data).
/api/badges/cachedSymbolsNotFound
- Returns the number of records flagged as "not found" upstream.
- Add your own symbols!
/api/uploads/symbol
POST
one or more supported symbol (currently.exe
,.dll
,.sys
and.pdb
) files using your own REST client or the provided harvesting agent.
WinDbgSymbolsCachingProxy
The symbols caching/hosting server backend that provides the REST API to the database.HarvestingAgent
A worker service that watches over filesystem directories for new symbols and uploads them to your servers.Nefarius.Utilities.ExceptionEnricher
A class library that makes use of the symbol server infrastructure to on-demand download debug symbols whenever an exception happens.
- Regarding non-native PDBs like those produced by .NET applications, currently only
full
(a.k.a. Windows-native) debug symbols are supported, since theportable
can not be parsed server-side.
dotnet publish -p:PublishProfile=Properties\PublishProfiles\release-win-x64.pubxml -c:Release .\WinDbgSymbolsCachingProxy.sln
Docker build
Use your own registry, of course π
docker build -t nefarius.azurecr.io/wdscp:latest . ; docker push nefarius.azurecr.io/wdscp:latest
This application benefits from these awesome projects β€ (appearance in no special order):