سؤال

What is the difference between crash-dump and hang-dump?

Suppose if i write a utility to create a dump of a process on clicking it, how will i intimate the utility to create an appropriate dump?

هل كانت مفيدة؟

المحلول

Not sure what you mean, they are both dumps of the application/kernel state (memory) in varying levels of detail. Whether the application has hung or crashed is kind of irrelevant in terms of what constitutes a dump see this doc and here http://www.debuginfo.com/articles/easywindbg2.html#savedumps what crash dump will have are the exception records of the crash itself.

MiniDumpWriteDump: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680360%28v=vs.85%29.aspx

Different types of dump: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680519%28v=vs.85%29.aspx

نصائح أخرى

Dumps are just snapshots of the process.

Crash situations are simpler to monitor. The application raised some unhandled exceptions and the monitoring process takes a snapshot of the faulting process. If you don’t setup any monitoring, the Windows OS will eventually generate a mini dump for you.

Hang situations (or 100% CPU hog) are application specific, therefor trickier to monitor . If the application is unresponsive or CPU intensive, maybe it’s because it is busy doing some number crunching? Maybe it hold for some network data? Maybe the application GUI is responsive, but two background worker threads got deadlocked?

Generally, I would recommend to generate a hang dump manually. When the end user/QA engineer is sure something is wrong. Automating hang dumps can be done, but the decision when to generate them is application specific.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top