Solved

Get a crash dump for a windows service

Posted on 2007-11-30
4
1,984 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now