WLK1.4 win 7 common stress test appear BSOD

Dear all
when my web camera image class upper filter driver running windows 7 x86 WL1.4 common stress test, BSOD (with bugcheck 8e) appeared. It seem to be appeared after I completed the createfile IRP. The BSOD offen appeared at the end of this test. it seems our application want to createfile driver's device object, when wake from S3. My driver is a ks.sys upper filter driver. I cannot reproduce this issue in VISTA,XP and Win7 X64.
Does anyone can tell me something about the following BSOD? I think there is no driver on the above of my driver. In my IRP_MJ_CREATE routine, I only complete it with SUCCESS statue.
thank you very much.

The following is the BSOD analysis.
KERNEL_MODE_EXCEPTION_NOT_HANDLED (8e)
This is a very common bugcheck. Usually the exception address pinpoints
the driver/function that caused the problem. Always note this address
as well as the link date of the driver/image that contains this address.
Some common problems are exception code 0x80000003. This means a hard
coded breakpoint or assertion was hit, but this system was booted
/NODEBUG. This is not supposed to happen as developers should never have
hardcoded breakpoints in retail code, but ...
If this happens, make sure a debugger gets connected, and the
system is booted /DEBUG. This will let us see why this breakpoint is
happening.
Arguments:
Arg1: c0000005, The exception code that was not handled
Arg2: 01c9f12a, The address that the exception occurred at
Arg3: 975899ac, Trap Frame
Arg4: 00000000

Debugging Details:

PEB is paged out (Peb.Ldr = 7ffd800c). Type ".hh dbgerr001" for details
PEB is paged out (Peb.Ldr = 7ffd800c). Type ".hh dbgerr001" for details

EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.

FAULTING_IP:
+1c9f12a
01c9f12a ?? ???

TRAP_FRAME: 975899ac -- (.trap 0xffffffff975899ac)
ErrCode = 00000010
eax=0052020c ebx=00000000 ecx=85178088 edx=0000007f esi=85178000 edi=851798a3
eip=01c9f12a esp=97589a20 ebp=97589a64 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00010246
01c9f12a ?? ???
Resetting default scope

DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT

BUGCHECK_STR: 0x8E

PROCESS_NAME: TWebCamera.exe

CURRENT_IRQL: 0

LAST_CONTROL_TRANSFER: from 828cb07c to 82917f28

STACK_TEXT:
97589514 828cb07c 0000008e c0000005 01c9f12a nt!KeBugCheckEx+0x1e
9758993c 82874fe6 97589958 00000000 975899ac nt!KiDispatchException+0x1ac
975899a4 82874f9a 97589a64 01c9f12a badb0d00 nt!CommonDispatchException+0x4a
97589a1c 82895443 0052020c 85178000 00001000 nt!KiExceptionExit+0x192
97589a64 933b825a 86dbd6f0 97589a88 8286dad1 nt!IopfCompleteRequest+0x128
97589a70 8286dad1 86dbd6f0 85178000 8526145c pgeffect!PGFilter_DispatchIo+0x3c
97589a88 82a62845 bf512c33 97589c30 00000000 nt!IofCallDriver+0x63
97589b60 82a4c2db 86dbd6f0 a5eeea38 85212008 nt!IopParseDevice+0xed7
97589bdc 82a6ec90 00000000 97589c30 00000040 nt!ObpLookupObjectName+0x4fa
97589c38 82a617c3 0012ecec 84eeea38 00000001 nt!ObOpenObjectByName+0x159
97589cb4 82aa5738 0012ed48 c0100080 0012ecec nt!IopCreateFile+0x673
97589d00 828743fa 0012ed48 c0100080 0012ecec nt!NtCreateFile+0x34
97589d00 77818244 0012ed48 c0100080 0012ecec nt!KiFastCallEntry+0x12a
WARNING: Frame IP not in any known module. Following frames may be wrong.
0012ed50 00000000 00000000 00000000 00000000 0x77818244

STACK_COMMAND: kb

FOLLOWUP_IP:
933b825a 8bc6 mov eax,esi

FAULTING_SOURCE_CODE:
2556: status = STATUS_DEVICE_REMOVED;
2557: }
2558: Irp->IoStatus.Status = status;
2559: IoCompleteRequest (Irp, IO_NO_INCREMENT);

2560: return status;
2561: }

0: kd> !devobj 86dbd6f0
Device object (86dbd6f0) is for:
\Driver\PGEffect DriverObject 86d79e28
Current Irp 00000000 RefCount 1 Type 00000022 Flags 00000044
Dacl 8223ec00 DevExt 86dbd7a8 DevObjExt 86dbd7c0
ExtensionFlags (0000000000)
Device queue is not busy.
0: kd> !devstack 86dbd6f0
!DevObj !DrvObj !DevExt ObjectName

86dbd6f0 \Driver\PGEffect 86dbd7a8
0: kd> !drvobj 86d79e28
Driver object (86d79e28) is for:
\Driver\PGEffect
Driver Extension List: (id , addr)

Device Object list:
86dbd6f0 852d7498
0: kd> !devobj 852d7498
Device object (852d7498) is for:
\Driver\PGEffect DriverObject 86d79e28
Current Irp 00000000 RefCount 0 Type 0000002f Flags 00002000
DevExt 852d7550 DevObjExt 852d76f0
ExtensionFlags (0x00000800)
Unknown flags 0x00000800
AttachedTo (Lower) 84f808e0*** ERROR: Module load completed but symbols could not be loaded for usbvideo.sys
\Driver\usbvideo
Device queue is not busy.
0: kd> !devstack 852d7498
!DevObj !DrvObj !DevExt ObjectName

852d7498 \Driver\PGEffect 852d7550
84f808e0 \Driver\usbvideo 84f809b0
86a6ec68 \Driver\usbccgp 86a6ed20
!DevNode 869f4080 :
DeviceInst is "USB\VID_04F2&PID_B096&MI_00\6&27a2eb1&0&0000"
ServiceName is "usbvideo"
0: kd> !devnode 869f4080
DevNode 0x869f4080 for PDO 0x86a6ec68
Parent 0x869f5008 Sibling 0000000000 Child 0000000000
InstancePath is "USB\VID_04F2&PID_B096&MI_00\6&27a2eb1&0&0000"
ServiceName is "usbvideo"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
StateHistory[00] = DeviceNodeEnumerateCompletion (0x30d)
StateHistory[19] = DeviceNodeEnumeratePending (0x30c)
StateHistory[18] = DeviceNodeStarted (0x308)
StateHistory[17] = DeviceNodeStartPostWork (0x307)
StateHistory[16] = DeviceNodeStartCompletion (0x306)
StateHistory[15] = DeviceNodeStartPending (0x305)
StateHistory[14] = DeviceNodeResourcesAssigned (0x304)
StateHistory[13] = DeviceNodeDriversAdded (0x303)
StateHistory[12] = DeviceNodeInitialized (0x302)
StateHistory[11] = DeviceNodeUninitialized (0x301)
StateHistory[10] = DeviceNodeInitialized (0x302)
StateHistory[09] = DeviceNodeUninitialized (0x301)
StateHistory[08] = DeviceNodeRemoved (0x312)
StateHistory[07] = DeviceNodeQueryRemoved (0x310)
StateHistory[06] = DeviceNodeStarted (0x308)
StateHistory[05] = DeviceNodeEnumerateCompletion (0x30d)
StateHistory[04] = DeviceNodeEnumeratePending (0x30c)
StateHistory[03] = DeviceNodeStarted (0x308)
StateHistory[02] = DeviceNodeEnumerateCompletion (0x30d)
StateHistory[01] = DeviceNodeEnumeratePending (0x30c)
Flags (0x2c000130) DNF_ENUMERATED, DNF_IDS_QUERIED,
DNF_NO_RESOURCE_REQUIRED
Unknown flags 0x2c000000
CapabilityFlags (0x00000690) Removable, SilentInstall,
SurpriseRemovalOK, WakeFromD0

Could anyone tell me how to understand every "StateHistory" state e.g DeviceNodeUninitialized in the above output?

thank you very much

Sorry,I need to add some useful information. This BSOD appears when OS try to enter S4, and we have found that the current device power state is D3 and system power state is S0. At this situation,does the driver need return error power status or delete the CDO to avoid the Apps access
again.

xxxxx@gmail.com wrote:

Dear all
when my web camera image class upper filter driver running windows 7 x86 WL1.4 common stress test, BSOD (with bugcheck 8e) appeared. It seem to be appeared after I completed the createfile IRP. The BSOD offen appeared at the end of this test. it seems our application want to createfile driver’s device object, when wake from S3. My driver is a ks.sys upper filter driver. I cannot reproduce this issue in VISTA,XP and Win7 X64.

If your driver is an upper filter driver, then it is unusual that you
would be calling IoCompleteRequest at all. Usually, the IRPs will all
have been completed by the layers below you. You might intercept the
completion chain, but you wouldn’t re-complete them.

Are you running driver verifier? Why do you need to intercept
IRP_MJ_CREATE?

Does anyone can tell me something about the following BSOD? I think there is no driver on the above of my driver. In my IRP_MJ_CREATE routine, I only complete it with SUCCESS statue.

Are you passing the request down to the driver below you? If so, then
the lower driver should be completing the request.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Dear Tim Roberts
sorry so late to reponse to you. Because we have created two device object, one was added into USB video device stack. The other was used by my own application, which wasn’t added into the statck.
So if my application want to communicate with my driver. It will call createfile, then driver will receive IRP_MJ_CRAETE.

thank you.