Solved

Get a crash dump for a windows service

Posted on 2007-11-30
4
1,990 Views
Last Modified: 2012-06-22
Hello,

I have tried to get a crush dump file from a windows service made by me. The problem is that drwtsn32 cannot catch ethese crashes or it cannot make dump files for services. Could anyone tell me how should I do it?

Thank you
0
Comment
Question by:aureliuh
4 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 20381228
Try using DebugDiag

http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any Win32 user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 20382226
You should add a interface to your service so that you can start it as a console prog from the command line.

At least you should add trace statements which let you narrow where the crash happens.

Regards, Alex
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 20384419
You can use 'MiniDumpWriteDump()' (http://msdn2.microsoft.com/en-us/library/ms680360.aspx) to create your own crash dump. For an example on how to do that, see http://www.codeproject.com/tools/minidump.asp ("Own Crash Minidump with Call Stack"). Also check out http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b170738 ("Debugging a Windows NT Service")
0
 

Author Comment

by:aureliuh
ID: 20391759
Thank you very much JKR. I used you suggested minidump project. I had to make some modification regarding the implementention of the __try __except block, because I did not work with my service. I had to use a _set_se_translator in order to catch SEH exceptions

Thank you again.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question