Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Useful things to put in the user stream segment of minidumps

I am interested in what useful things developers put in the user stream data structure that can be embedded in minidumps. MSDN describes the parameter for MiniDumpWriteDump as such:

PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam

and describes the parameter thusly:

UserStreamParam [in] Pointer to an array of MINIDUMP_USER_STREAM_INFORMATION structures. If the value of this parameter is NULL, no user-defined information is included in the minidump file.

I was considering embedding the last n log lines of my program in a user stream since testers tend not to send the properly formatted logs with all bugs all the time.

Also, I could put hardware specs (memory, CPU, video, etc) in that section.

What else have people used the user stream segment for?

like image 906
Michael Labbé Avatar asked Nov 02 '09 06:11

Michael Labbé


2 Answers

I like your idea of including historical log information. However, if the minidump is being produced in response to an exception of some type, it seems that stopping to read a log file to include in the dump might not always be the best plan since the stability of the system may be questionable.

Our default type is MiniDumpWithFullMemory. In that case, the user stream information does not seem particularly useful in our application because the full memory includes pretty much every possible bit of information we need (at least so far). And we have also had pretty good luck with getting all the error log files when people send us a dump file.

However, our users can change the type with a configuration parameter. I can see that with one of the smaller minidump types, the user stream information could be very useful. I had never actually given any real thought to that parameter of the minidump function until I saw this post. We have a few structures in memory with basic configuration information that would be invaluable in cases where a full memory dump is not produced. Also, the structure containing the details of the user that "caused" the exception would be handy. I will have to consider adding a few of those to be dumped out as user streams.

like image 152
Mark Wilkins Avatar answered Oct 31 '22 18:10

Mark Wilkins


What may be more useful than filling in additional information here, is to include any log files you generate with WerRegisterFile.

like image 33
Sam Avatar answered Oct 31 '22 20:10

Sam