![]() |
![]() |
|
December 13, 2004How to handle and interpret BSODs on WindowsToday I read a post by Susan in which she makes some good recommendations on how to get a dump when a system crashes. I found a few of her points could be expanded upon and slightly modified, and started to comment on her blog. Then I realized it might be useful to others in the community, and decided to post it here. There are a couple of things to consider when dealing with a kernel crash dump. You should read Susan's article first in order to understand her recommendations on setting up kernel dumps on Windows.
If you want to get geeky and LOOK at the fault (in case you skipped point one and the system rebooted), it is possible. To do this you will need to download Microsoft's kernel debugger called WinDbg. Then take the following steps:
Probably caused by : foodriver.sys ( foodriver+4f20 ) Chances are, THAT is your offending driver (and the offset is the location, so if you let the vendor know they will know right down to the line number). What do you do now? Well remove it. If the driver loads on demand, not a problem, you can simply remove the offending software. But what if the driver loads at boot time? You will never be able to do that, since the system will constantly crash on startup! That is why the "Recovery Console" exists. Stick in your W2K3 or XP CD and boot from it. When asked, hit "R" for Recovery Console. When prompted type in your Adminstrator's password. Once logged into the console type net stop <drivername>. This will set the driver to NOT load on boot. You should then be able to boot up, and remove the offending driver. Susan, tell your friend there is no need to reformat and reinstall. Just use the tools available to you to remove the offending driver! Posted by SilverStr at December 13, 2004 07:37 AM | TrackBackComments
I have taken on-board your advice about turning off the Auto restart and Overwrite - sound advice now that you have explained it in a logical fashion. Hi Dana. Great post. First, small typo: I would point out that your command "analyze -v" should really be "!analyze -v" unless there is !analyze that does not require the ! which I am not familiar with (entirely possible, but at least in kd that's what I'm seeing in the dump I have in front of me). Secondly, on your comment "Chances are, THAT is your offending driver (and the offset is the location, so if you let the vendor know they will know right down to the line number)." It is not really right to say that the line # cited in the crash is root cause of the issue (even if it is the right driver, which it may or may not be). Reason is, perhaps there was previous corruption which a later line of code fell victim to. See issues that need pool tags for at least one example of what I mean. Third, I'd add that there are concerns in creating dmps depending upon size of your paging file and amt of physical memory on the box. There is some documentation out there on this, so I won't recite it all here. But it is worth remembering. Finally, I'd say windbg is not our kernel mode debugger. Rather, a DLL (or a few DLLs) really act as the debugger. Windbg is a GUI for it. I point that out as I do both user and kernel mode debugging, but don't use windbg (I use cdb/kd). :) Posted by: Eric Fleischman at December 13, 2004 09:24 AMRichard, The small memory dump is the mini dump. That will be sufficient for most cases. 64K doesn't normally gobble up to much resources :) In your example of 4GB of ram, remember that the dump is of KERNEL memory, and not unallocated or usermode memory. The normal rule of thumb is that approximately one third of your physical memory will be available for the paging file up to about a gig. This wouild typically range between 100MB - 800MB depending on the system. In your case, I would guess it would be up at around the 800-1Gig range, when it full use. Posted by: SilverStr at December 13, 2004 09:38 AMHey Eric, Very good points. I have corrected the typo. You are right that the bang (!) is needed. As to your point about the line # cited... although you cannot predict if it IS the offending line (especially with pool corruption issues), it WILL give you an area to look at. I have found that in combination with other information (such as !pool) you can walk the data and figure out if someone trampled the pool header, and where its coming from. Typically though that is done on a live dump, not on a post-analysis from a kernel dump. I just commented to Richard about the paging file issue with physical memory. Basically the issue exists that under normal situations the kernel memory dump will be about one third of the physical memory, depending on allocation needs and optimization techniques. And chances are really good that this info isn't needed to find the offending driver. Of course if life was full of absolutes, we wouldn't be having this discussion. There WILL be times when you want that memory dump. And you will need to make the room for the dump. And finally, I will conceed that WinDbg is the GUI front end to Microsoft's debug libraries. A really nice one if you ask me, especially with the integrated help which has FINALLY become very useful in the latest year or so. As much as I am a cmd line guy, I prefer Windbg over kd. Just preference I suppose. Good comments. Thanks for posting! Posted by: SilverStr at December 13, 2004 09:47 AMUgh all you crazy UI people. If it can't be done off of the command line debuggers, I am uninterested!!! :) The live scenario is great for you and I to discuss, not as great for a customer. Most mission critical systems feel pain for a single reboot for the dump itself, nevermind the prospect of live debugging it (read: hours of time in some cases instead of the min amt of time for writing the dump + reboot). So I try and stay away from live unless absolutely required. Posted by: Eric Fleischman at December 13, 2004 03:55 PM |
![]() ![]()
My 5 Favorite Books
Writing Secure Code
Secure Programming Cookbook Security Engineering Secure Coding Principles & Practice Inside the Security Mind ![]()
My 5 Favorite Papers
Smashing the Stack
Penetration Studies Covert Channel Analysis of Trusted Systems DoD Trusted Computer System Evaluation Criteria NSA Security Recommendation Guides ![]()
Archives
December 2005
November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April 2005 March 2005 February 2005 January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 ![]() |
|