Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simplest method for creating dump file for troubled process

Tags:

c#

dump

windbg

I have found multiple ways of creating dump file such using windows utitlity userdump and adplus.vbs and a few others. There is one option that I have found in task manager seems to be the easiest and simplest one open task manager + select the process + right click + create user dump. Is the .dmp file created using taks manager any different than the one created using win utilities?

Getting a user to create a dump file from task manager is so much easier than having him run the utilities.

like image 398
bsobaid Avatar asked May 31 '12 18:05

bsobaid


3 Answers

Keep in mind that on a 64-bit OS, the dump created by Task Manager for a WOW process will be a 64-bit dump. This can cause problems, especially if you're debugging managed code. For 32-bit WOW processes, it's generally best to use a 32-bit utility.

like image 158
Steve Johnson Avatar answered Nov 02 '22 23:11

Steve Johnson


Not sure what the difference is in the minidump created from task manager but if you want further information then the best thing to do is to create the minidump either programmatically and set the appropriate flags (note that some flags are OS dependent) or using Dr. Watson where you can simply check the boxes for the information you want in the dump file.

You can programmatically create the dump using MiniDumpWriteDump: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680360%28v=vs.85%29.aspx there is a SO article on this: How to create minidump for my process when it crashes?

You can also setup dr. Watson to generate them for you when the crash happens: http://kb.acronis.com/content/2191

the task manager solution is fine but generating them automatically is better IMO and generating them programmatically gives you better control and the option to dump additional information specific to your app.

like image 34
EdChum Avatar answered Nov 02 '22 23:11

EdChum


One of the methods that we use for catching crashes or hangs on end-user machines is with the excellent ProcDump utility, and we write a simple batch script that either sits and waits until the app is unresponsive, or you can set other conditions such as when the CPU usage reaches a particular point. I give an example in this response.

like image 28
the_mandrill Avatar answered Nov 03 '22 00:11

the_mandrill