Wednesday, November 7, 2007

MOVB-07 Drivers, drivers, drivers!

When looking for drivers under Vista, you can run into the following trouble:

You will never get the driver, because your hardware is unsupported

Here is a sample error message:

Windows Vista does not support SNAPSCAN e20. This problem was caused by a compatibility issue between Windows Vista and SNAPSCAN e20. AGFA-Gevaert NV, the company that manufactured SNAPSCAN e20, has informed Microsoft that they do not expect to offer updates to fix this problem.

You are trying to use a "generic" piece of hardware

In most cases, you loose! For instance, when trying to plug a generic USB mouse, here is what you get:


You are looking for a video driver

According to Microsoft, drivers are accountable for most Blue Screens of Death. So they decided to move as many drivers as possible in userland, especially video drivers. This is called User Mode Driver Framework (aka UMDF).

The result: most video cards that are older than, let's say 2 years, will never have Vista drivers (since manufacturers do not see clear value in porting drivers to UMDF).

You are running Vista64


Oh my! This is alpha-testing!

For instance, here are two crash dumps that are related to my NVidia Quadro FX 3400 Vista64 driver. Most driver code is userland-based, but there is still a kernelland recovery thread. And if the userland driver does not recover fast enough, the system will ... BSoD!

0: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

VIDEO_TDR_FAILURE (116)
Attempt to reset the display driver and recover from timeout failed.
Arguments:
Arg1: fffffa8003c8c630, Optional pointer to internal TDR recovery context (TDR_RECOVERY_CONTEXT).
Arg2: fffff9800404e0f0, The pointer into responsible device driver module (e.g. owner tag).
Arg3: ffffffffc00000b5, Optional error code (NTSTATUS) of the last failed operation.
Arg4: 000000000000000a, Optional internal context dependent data.

Debugging Details:
------------------

FAULTING_IP:
nvlddmkm+60f0
fffff980`0404e0f0 4883ec28 sub rsp,28h

DEFAULT_BUCKET_ID: GRAPHICS_DRIVER_TDR_FAULT

BUGCHECK_STR: 0x116

PROCESS_NAME: System

CURRENT_IRQL: 0

STACK_TEXT:
fffff980`05370a08 fffff980`0477c01c : 00000000`00000116 fffffa80`03c8c630 fffff980`0404e0f0 ffffffff`c00000b5 : nt!KeBugCheckEx
fffff980`05370a10 fffff980`0477bf1f : fffff980`0404e0f0 fffffa80`03c8c630 fffffa80`05da0820 fffffa80`0320b730 : dxgkrnl!TdrBugcheckOnTimeout+0xec
fffff980`05370a50 fffff980`04738c48 : fffff980`ffffe464 00000000`c00000b5 00000000`00000000 fffffa80`0320b730 : dxgkrnl!TdrIsRecoveryRequired+0x1c3
fffff980`05370a90 fffff980`047f5993 : 00000000`00000000 00000000`00000002 00000000`ffffffff 00000000`00000002 : dxgkrnl!VidSchiReportHwHang+0x2f4
fffff980`05370b40 fffff980`047f4591 : fffffa80`0320b730 00000000`00000000 00000000`01ff8f6c 00000000`00000000 : dxgkrnl!VidSchiCheckHwProgress+0x7b
fffff980`05370b70 fffff980`0473ccd8 : ffffffff`ff676980 00000000`00000000 00000000`00000000 00000000`00000000 : dxgkrnl!VidSchiWaitForSchedulerEvents+0x199
fffff980`05370bf0 fffff980`047f43b1 : 00000000`00000000 fffffa80`031fe710 00000000`00000080 fffffa80`0320b730 : dxgkrnl!VidSchiScheduleCommandToRun+0x398
fffff980`05370d10 fffff800`01ae199b : fffffa80`053b4060 fffff800`018388f7 fffff980`0121f900 00000000`00000001 : dxgkrnl!VidSchiWorkerThread+0x95
fffff980`05370d50 fffff800`01834b86 : fffff980`00c85180 fffffa80`053b4060 fffff980`00c8ec40 fffff980`00a75290 : nt!PspSystemThreadStartup+0x5b
fffff980`05370d80 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x16


STACK_COMMAND: .bugcheck ; kb

FOLLOWUP_IP:
nvlddmkm+60f0
fffff980`0404e0f0 4883ec28 sub rsp,28h

SYMBOL_NAME: nvlddmkm+60f0

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: nvlddmkm

IMAGE_NAME: nvlddmkm.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 4578ef88

FAILURE_BUCKET_ID: X64_0x116_IMAGE_nvlddmkm.sys

BUCKET_ID: X64_0x116_IMAGE_nvlddmkm.sys



0: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

VIDEO_TDR_FAILURE (116)
Attempt to reset the display driver and recover from timeout failed.
Arguments:
Arg1: fffffa80034834e0, Optional pointer to internal TDR recovery context (TDR_RECOVERY_CONTEXT).
Arg2: fffff980046d5800, The pointer into responsible device driver module (e.g. owner tag).
Arg3: 0000000000000000, Optional error code (NTSTATUS) of the last failed operation.
Arg4: 0000000000000002, Optional internal context dependent data.

Debugging Details:
------------------

FAULTING_IP:
nvlddmkm+8800
fffff980`046d5800 4885c9 test rcx,rcx

DEFAULT_BUCKET_ID: GRAPHICS_DRIVER_TDR_FAULT

BUGCHECK_STR: 0x116

PROCESS_NAME: System

CURRENT_IRQL: 0

STACK_TEXT:
fffff980`05ef9a08 fffff980`0517c2c4 : 00000000`00000116 fffffa80`034834e0 fffff980`046d5800 00000000`00000000 : nt!KeBugCheckEx
fffff980`05ef9a10 fffff980`0517c0f7 : fffff980`046d5800 fffffa80`034834e0 fffffa80`06252d90 fffffa80`03733730 : dxgkrnl!TdrBugcheckOnTimeout+0xec
fffff980`05ef9a50 fffff980`05137c1b : fffff980`ffffe464 00000000`00000000 00000000`00000000 fffffa80`03733730 : dxgkrnl!TdrIsRecoveryRequired+0x16f
fffff980`05ef9a90 fffff980`051f5f83 : 00000000`00000000 00000000`00000002 00000000`ffffffff 00000000`00000002 : dxgkrnl!VidSchiReportHwHang+0x2f7
fffff980`05ef9b40 fffff980`051f4b85 : fffffa80`03733730 00000000`00000000 00000000`0000f375 00000000`00000000 : dxgkrnl!VidSchiCheckHwProgress+0x7b
fffff980`05ef9b70 fffff980`0513bc90 : ffffffff`ff676980 00000000`00000000 00000000`00000000 00000000`00000000 : dxgkrnl!VidSchiWaitForSchedulerEvents+0x199
fffff980`05ef9bf0 fffff980`051f49a5 : 00000000`00000000 fffffa80`0372d430 00000000`00000080 fffffa80`03733730 : dxgkrnl!VidSchiScheduleCommandToRun+0x398
fffff980`05ef9d10 fffff800`01ee222b : fffffa80`03737a70 fffff800`01c38257 fffff980`014e0900 00000000`00000001 : dxgkrnl!VidSchiWorkerThread+0x95
fffff980`05ef9d50 fffff800`01c344f6 : fffff980`00c4e180 fffffa80`03737a70 fffffa80`0359db60 fffffa80`03733c90 : nt!PspSystemThreadStartup+0x5b
fffff980`05ef9d80 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KxStartSystemThread+0x16


STACK_COMMAND: .bugcheck ; kb

FOLLOWUP_IP:
nvlddmkm+8800
fffff980`046d5800 4885c9 test rcx,rcx

SYMBOL_NAME: nvlddmkm+8800

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: nvlddmkm

IMAGE_NAME: nvlddmkm.sys

DEBUG_FLR_IMAGE_TIMESTAMP: 46c63a34

FAILURE_BUCKET_ID: X64_0x116_IMAGE_nvlddmkm.sys

BUCKET_ID: X64_0x116_IMAGE_nvlddmkm.sys

No comments: