Skip to content

Instantly share code, notes, and snippets.

@rygorous
Created November 6, 2014 07:07
Embed
What would you like to do?
Build nondeterminism of the day
From: Jeff
To: RAD Developers
Subject: ah hah...
I finally repro-ed something that has long worried me. From one build to the next, my PDB
data would be very different sizes (especially on Xbox 360). Like from one minor version
to another (with no system SDK difference), I would get much bigger or smaller PDBs.
That was with clean build directories, no cdep changes, nothing. And then when I noticed
it (I check file sizes as part of my release to make sure I don't fuck something up), I
would rebuild and then it would make files the exact same size again and again. Then, at
some point in the future, it would be change again.
But I think I figured this out.
The problem is that *sometimes* MSVC leaves a bunch of mspdbsrv.exe (and srvx.exe) processes
around when doing a full build. Sometimes they stay running, and sometimes they close at the
end of linking - no idea why. This happens on a just normal builds and full builds.
It turns out, if those processes have been running for a long time (say you've been working
on something for a few days), and then you do a build, the filesizes will be larger
(presumably something is getting screwed up in their caching or something). If you forcibly
close these processes, and THEN do the full build, you get file sizes that are smaller.
The More You Know...
->Jeff
RAD Game Tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment