Thoughts from the EPS Windows Server Performance Team
Over the last few weeks, we’ve been posting quite a bit on different topics related to Debugging. Today we’re continuing in that vein by looking at one of the most common commands that we use when reviewing both kernel- and user-mode dump files – !analyze. !analyze is an extension command that performs a number of automated analysis steps and displays information about the exception or bug check in the dump file. There are a couple of different parameters that you can use, depending on whether or not you are debugging a kernel- or user-mode dump file, but the one that you will probably use most often is –v which shows the verbose output. As with our other posts on debugging commands, let’s go through the parameters first, and then take a look at some examples:
OK – now let’s take a look at some examples of !analyze in action beginning with the straightforward command. The dump file I’m using for this post is from a Windows XP SP3 system using an in-house debug training application to create the bugcheck.
1: kd> !analyze******************************************************************************** ** Bugcheck Analysis ** ********************************************************************************Use !analyze -v to get detailed debugging information.BugCheck D1, {e5a30000, 2, 1, ba636729}Probably caused by : buggy.sys ( buggy+729 )Followup: MachineOwner
As you can see there is very little information here – just the parameters for the bugcheck and a probable cause. Now let’s look at the output from the !analyze –v command:
1: kd> !analyze -v******************************************************************************** ** Bugcheck Analysis ** ********************************************************************************DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)An attempt was made to access a pageable (or completely invalid) address at aninterrupt request level (IRQL) that is too high. This is usuallycaused by drivers using improper addresses.If kernel debugger is available get stack backtrace.Arguments:Arg1: e5a30000, memory referencedArg2: 00000002, IRQLArg3: 00000001, value 0 = read operation, 1 = write operationArg4: ba636729, address which referenced memoryDebugging Details:------------------WRITE_ADDRESS: e5a30000 Paged poolCURRENT_IRQL: 2FAULTING_IP: buggy+729ba636729 f3ab rep stos dword ptr es:[edi]DEFAULT_BUCKET_ID: DRIVER_FAULTBUGCHECK_STR: 0xD1PROCESS_NAME: dbgt.exeTRAP_FRAME: ae5e6bb8 -- (.trap 0xffffffffae5e6bb8).trap 0xffffffffae5e6bb8ErrCode = 00000002eax=00000000 ebx=88e03348 ecx=00002800 edx=00000000 esi=88e03348 edi=e5a30000eip=ba636729 esp=ae5e6c2c ebp=ae5e6c34 iopl=0 nv up ei pl zr na pe nccs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246buggy+0x729:ba636729 f3ab rep stos dword ptr es:[edi].trapResetting default scopeLAST_CONTROL_TRANSFER: from ba636729 to 805446f0STACK_TEXT: ae5e6bb8 ba636729 badb0d00 00000000 00000000 nt!KiTrap0E+0x238WARNING: Stack unwind information not available. Following frames may be wrong.ae5e6c34 ba636894 88ef8280 88f73808 804ef19f buggy+0x729ae5e6c64 805807f7 88fc0d38 88e03348 88ef8280 buggy+0x894ae5e6d00 80579274 000002ec 00000000 00000000 nt!IopXxxControlFile+0x5c5ae5e6d34 8054162c 000002ec 00000000 00000000 nt!NtDeviceIoControlFile+0x2aae5e6d34 7c90e514 000002ec 00000000 00000000 nt!KiFastCallEntry+0xfc0012f6c0 7c90d28a 7c801675 000002ec 00000000 ntdll!KiFastSystemCallRet0012f6c4 7c801675 000002ec 00000000 00000000 ntdll!ZwDeviceIoControlFile+0xc0012f724 00414bac 000002ec 00220014 00000000 kernel32!DeviceIoControl+0xdd0012f830 0041565d 00040222 00220014 0012fa9c dbgt+0x14bac0012f90c 00413d2d 0000012d 00220014 00040222 dbgt+0x1565d0012fa9c 7e418734 00040222 00000111 000003ec dbgt+0x13d2d0012fac8 7e418816 004115b9 00040222 00000111 USER32!InternalCallWinProc+0x280012fb30 7e42927b 00000000 004115b9 00040222 USER32!UserCallWinProcCheckWow+0x1500012fb6c 7e4292e3 0075f640 0075f5c0 000003ec USER32!SendMessageWorker+0x4a50012fb8c 7e44ff7d 00040222 00000111 000003ec USER32!SendMessageW+0x7f0012fba4 7e4465d2 00761248 00000000 00761248 USER32!xxxButtonNotifyParent+0x410012fbc0 7e425e94 001c4d40 00000001 00000000 USER32!xxxBNReleaseCapture+0xf80012fc44 7e425231 00761248 00000202 00000000 USER32!ButtonWndProcWorker+0x6df0012fc64 7e418734 00010414 00000202 00000000 USER32!ButtonWndProcW+0x4c0012fc90 7e418816 7e4251d1 00010414 00000202 USER32!InternalCallWinProc+0x280012fcf8 7e4189cd 00000000 7e4251d1 00010414 USER32!UserCallWinProcCheckWow+0x1500012fd58 7e418a10 0012fe68 00000000 0012fe88 USER32!DispatchMessageWorker+0x3060012fd68 0041219e 0012fe68 80000001 02e2d9e4 USER32!DispatchMessageW+0xf0012fe88 00416760 00400000 00000000 0002072a dbgt+0x1219e0012ffc0 7c817077 80000001 02e2d9e4 7ffd5000 dbgt+0x167600012fff0 00000000 00411758 00000000 78746341 kernel32!BaseProcessStart+0x23STACK_COMMAND: kbFOLLOWUP_IP: buggy+729ba636729 f3ab rep stos dword ptr es:[edi]SYMBOL_STACK_INDEX: 1SYMBOL_NAME: buggy+729FOLLOWUP_NAME: MachineOwnerMODULE_NAME: buggyIMAGE_NAME: buggy.sysDEBUG_FLR_IMAGE_TIMESTAMP: 40a88083FAILURE_BUCKET_ID: 0xD1_buggy+729BUCKET_ID: 0xD1_buggy+729Followup: MachineOwner
Wow – lots more information for us including the stop code information, the stack and the current IRQL. If I just wanted to review the information on the error itself using the –show parameter, here’s what I would get back:
1: kd> !analyze -show D1 e5a30000 2 1 ba636729DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)An attempt was made to access a pageable (or completely invalid) address at aninterrupt request level (IRQL) that is too high. This is usuallycaused by drivers using improper addresses.If kernel debugger is available get stack backtrace.Arguments:Arg1: e5a30000, memory referencedArg2: 00000002, IRQLArg3: 00000001, value 0 = read operation, 1 = write operationArg4: ba636729, address which referenced memory
Now, we’re not going to get into the actual debugging of this crash, but those of you who have some experience with bugchecks and debugging have probably already spotted the cause for this bugcheck just from the data given. The resources provided below go into more detail on some of the other pieces of data in the verbose output. That’s all for today folks – have a great Tuesday! Until next time …
Additional Resources:
- CC Hameed
>> Now, we’re not going to get into the actual debugging of this crash, but those of you who have some experience with bugchecks and debugging have probably already spotted the cause for this bugcheck just from the data given <<
Was this suggestion to mean, details other than that the bugcheck was likely caused by buggy.sys?