Hi, everyone. Sorry for the delay in responding.
I can see this feature’s utility for sure. I have two concerns with treating attached files as distinct files from the minidump: it leads to a more complex design for the local crash report database, and it makes it easier for the attachments and the minidump to become separated from each other. We’ve had a very real problem in the past with the latter issue when using the Breakpad client. It was too easy for annotations (“crash keys”) to became separated from the minidumps that they belonged to. This is why annotations are now stored in a Crashpad minidump’s MinidumpCrashpadInfo stream, in addition to being sent to the collection server as an <inpute type="text" /> for Breakpad compatibility.
Taking a step back to look at the bigger picture, I think that everyone’s really asking for a way to attach files to minidumps somehow, but that it’s probably not important what the precise transport mechanism is. The Breakpad client made these attachments look like <input type="file" /> that were siblings to the minidump, but that’s more of an implementation detail to me.
What I’d like to propose for the design of this feature is to archive these attachments in the minidump file itself. Now, it would be possible to hang them off of a custom user stream, or we could hang them somewhere off of our MinidumpCrashpadInfo stream. That’d be fairly easy to implement on our end, but it’d require special tooling to extract the attached files. One of our goals with Crashpad is to keep things to familiar and comfortable formats and tools when possible.
An old idea that I had that I’d like to consider using for this feature is to make our minidumps into “polyglot files”. A minidump is identified by its header, which is conveniently at the beginning of the file. A .zip archive is identified by its header, which is actually a trailer at the end of the file. We can smush a minidump and .zip archive together, and let the attached files live in the .zip portion. Existing minidump tools could be used to interact with the minidump portion of the file, and existing zip tools could be used to interact with the .zip portion. This is similar to how self-extracting .zip files are laid out as executables, while it remains possible to interact with them using standard zip tools.
An annotation-like interface for the crashing process to communicate desired attachments to the handler via absolute pathname should be uncontroversial.