DRIVER_POWER_STATE_FAILURE Problem.

Hello Gurus,

When ever i shutdown/restart my system or when i make a check disk at boot
up which automatically restarts a system after checkdisk i get this strange
bugcheck.
The first Parameter is 0x00000100.
This happens only in Windows 2000 and not in XP. The Bugcheck text is at the
bottom of this email.
Has anyone encountered this.
Can anyone point out whats really wrong?
Thanks a lot in Advance.

Regards
Shal

MYDriver Shutdown Command Received

*** Fatal System Error: 0x0000009f
(0x00000100,0x84DCC030,0x84DCC030,0x84DC4D90)

Break instruction exception - code 80000003 (first chance)

A fatal system error has occurred.
Debugger entered on first try; Bugcheck callbacks have not been invoked.

A fatal system error has occurred.

Connected to Windows 2000 2195 x86 compatible target, ptr64 FALSE
Loading Kernel Symbols

Loading unloaded module list
No unloaded module list present
Loading User Symbols

*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

Use !analyze -v to get detailed debugging information.

BugCheck 9F, {100, 84dcc030, 84dcc030, 84dc4d90}

Probably caused by : ntoskrnl.exe ( nt!IoBuildPoDeviceNotifyList+274 )

Followup: MachineOwner

nt!RtlpBreakWithStatusInstruction:
80452e70 cc int 3
kd> !analyze -v
*******************************************************************************
*
*
* Bugcheck Analysis
*
*
*
*******************************************************************************

DRIVER_POWER_STATE_FAILURE (9f)
A driver is causing an inconsistent power state.
Arguments:
Arg1: 00000100, SubCode
Arg2: 84dcc030
Arg3: 84dcc030
Arg4: 84dc4d90

Debugging Details:

DRVPOWERSTATE_SUBCODE: 100

DRIVER_OBJECT: 84dc4d90

DEVICE_OBJECT: 84dcc030

DEFAULT_BUCKET_ID: DRIVER_FAULT

BUGCHECK_STR: 0x9F

LAST_CONTROL_TRANSFER: from 8042bcb9 to 80452e70

STACK_TEXT:
eb8f36ec 8042bcb9 00000003 eb8f3734 00000100
nt!RtlpBreakWithStatusInstruction
eb8f371c 8042c068 00000003 84c284bc 84c302e8 nt!KiBugCheckDebugBreak+0x31
eb8f3aa4 80483310 00000000 00000100 84dcc030 nt!KeBugCheckEx+0x37b
eb8f3ae4 804890ed 84c284ac 00000001 00000000
nt!IoBuildPoDeviceNotifyList+0x274
eb8f3b04 80488c70 00000000 eb8f3bf4 eb8f3c78
nt!PopSetDevicesSystemState+0x85
eb8f3be0 80461691 00000005 00000004 c0000004 nt!NtSetSystemPowerState+0x320
eb8f3be0 804014d5 00000005 00000004 c0000004 nt!KiSystemService+0xc4
eb8f3c64 804889c3 00000005 00000004 c0000004 nt!ZwSetSystemPowerState+0xb
eb8f3d48 804c61a9 00000005 00000004 c0000004 nt!NtSetSystemPowerState+0x70
eb8f3d58 80461691 00000001 8944e220 92140464 nt!NtShutdownSystem+0x2e
eb8f3d58 77f9a5bd 00000001 8944e220 92140464 nt!KiSystemService+0xc4
0006e664 010057a4 00000001 00072d88 00000000 ntdll!NtShutdownSystem+0xb
0006e69c 010355b1 00000000 0006fef8 01001848 autochk!IFS_SYSTEM::Reboot+0x64
0006fbd0 0100977e 00000101 00072d01 00000000
autochk!NTFS_SA::VerifyAndFix+0x1cc4
0006fc34 010033a9 00000001 00072d88 00000006
autochk!VOL_LIODPDRV::ChkDsk+0x4f
0006fd50 01002d2d 0006fee0 0006fefc 00000006 autochk!InvokeAutoChk+0x400
0006ffb4 0104cd45 00000003 00072430 00072440 autochk!main+0x845
0006fff4 00000000 7ffdf000 000000c8 00000100 autochk!NtProcessStartup+0x18d

FOLLOWUP_IP:
nt!IoBuildPoDeviceNotifyList+274
80483310 8b55ec mov edx,[ebp-0x14]

SYMBOL_STACK_INDEX: 3

FOLLOWUP_NAME: MachineOwner

SYMBOL_NAME: nt!IoBuildPoDeviceNotifyList+274

MODULE_NAME: nt

IMAGE_NAME: ntoskrnl.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 384d9b17

STACK_COMMAND: kb

BUCKET_ID: 0x9F_nt!IoBuildPoDeviceNotifyList+274

Followup: MachineOwner

and mine is a Upper Class Filter Driver named MyDriver.
If i unload my driver ofcourse nothing happens like this.

“Shalini” wrote in message news:xxxxx@ntdev…
> Hello Gurus,
>
> When ever i shutdown/restart my system or when i make a check disk at boot
> up which automatically restarts a system after checkdisk i get this
> strange bugcheck.
> The first Parameter is 0x00000100.
> This happens only in Windows 2000 and not in XP. The Bugcheck text is at
> the bottom of this email.
> Has anyone encountered this.
> Can anyone point out whats really wrong?
> Thanks a lot in Advance.
>
> Regards
> Shal
>
>
> MYDriver Shutdown Command Received
>
> Fatal System Error: 0x0000009f
> (0x00000100,0x84DCC030,0x84DCC030,0x84DC4D90)
>
> Break instruction exception - code 80000003 (first chance)
>
> A fatal system error has occurred.
> Debugger entered on first try; Bugcheck callbacks have not been invoked.
>
> A fatal system error has occurred.
>
> Connected to Windows 2000 2195 x86 compatible target, ptr64 FALSE
> Loading Kernel Symbols
> …
> Loading unloaded module list
> No unloaded module list present
> Loading User Symbols
> …
>
****************************************************************************
> * *
> * Bugcheck Analysis *
> * *
>
>
> Use !analyze -v to get detailed debugging information.
>
> BugCheck 9F, {100, 84dcc030, 84dcc030, 84dc4d90}
>
> Probably caused by : ntoskrnl.exe ( nt!IoBuildPoDeviceNotifyList+274 )
>
> Followup: MachineOwner
> ---------
>
> nt!RtlpBreakWithStatusInstruction:
> 80452e70 cc int 3
> kd> !analyze -v
>

> * *
> * Bugcheck Analysis *
> * *
> *******************************************************************************
>
> DRIVER_POWER_STATE_FAILURE (9f)
> A driver is causing an inconsistent power state.
> Arguments:
> Arg1: 00000100, SubCode
> Arg2: 84dcc030
> Arg3: 84dcc030
> Arg4: 84dc4d90
>
> Debugging Details:
> ------------------
>
>
> DRVPOWERSTATE_SUBCODE: 100
>
> DRIVER_OBJECT: 84dc4d90
>
> DEVICE_OBJECT: 84dcc030
>
> DEFAULT_BUCKET_ID: DRIVER_FAULT
>
> BUGCHECK_STR: 0x9F
>
> LAST_CONTROL_TRANSFER: from 8042bcb9 to 80452e70
>
> STACK_TEXT:
> eb8f36ec 8042bcb9 00000003 eb8f3734 00000100
> nt!RtlpBreakWithStatusInstruction
> eb8f371c 8042c068 00000003 84c284bc 84c302e8 nt!KiBugCheckDebugBreak+0x31
> eb8f3aa4 80483310 00000000 00000100 84dcc030 nt!KeBugCheckEx+0x37b
> eb8f3ae4 804890ed 84c284ac 00000001 00000000
> nt!IoBuildPoDeviceNotifyList+0x274
> eb8f3b04 80488c70 00000000 eb8f3bf4 eb8f3c78
> nt!PopSetDevicesSystemState+0x85
> eb8f3be0 80461691 00000005 00000004 c0000004
> nt!NtSetSystemPowerState+0x320
> eb8f3be0 804014d5 00000005 00000004 c0000004 nt!KiSystemService+0xc4
> eb8f3c64 804889c3 00000005 00000004 c0000004 nt!ZwSetSystemPowerState+0xb
> eb8f3d48 804c61a9 00000005 00000004 c0000004 nt!NtSetSystemPowerState+0x70
> eb8f3d58 80461691 00000001 8944e220 92140464 nt!NtShutdownSystem+0x2e
> eb8f3d58 77f9a5bd 00000001 8944e220 92140464 nt!KiSystemService+0xc4
> 0006e664 010057a4 00000001 00072d88 00000000 ntdll!NtShutdownSystem+0xb
> 0006e69c 010355b1 00000000 0006fef8 01001848
> autochk!IFS_SYSTEM::Reboot+0x64
> 0006fbd0 0100977e 00000101 00072d01 00000000
> autochk!NTFS_SA::VerifyAndFix+0x1cc4
> 0006fc34 010033a9 00000001 00072d88 00000006
> autochk!VOL_LIODPDRV::ChkDsk+0x4f
> 0006fd50 01002d2d 0006fee0 0006fefc 00000006 autochk!InvokeAutoChk+0x400
> 0006ffb4 0104cd45 00000003 00072430 00072440 autochk!main+0x845
> 0006fff4 00000000 7ffdf000 000000c8 00000100
> autochk!NtProcessStartup+0x18d
>
>
> FOLLOWUP_IP:
> nt!IoBuildPoDeviceNotifyList+274
> 80483310 8b55ec mov edx,[ebp-0x14]
>
> SYMBOL_STACK_INDEX: 3
>
> FOLLOWUP_NAME: MachineOwner
>
> SYMBOL_NAME: nt!IoBuildPoDeviceNotifyList+274
>
> MODULE_NAME: nt
>
> IMAGE_NAME: ntoskrnl.exe
>
> DEBUG_FLR_IMAGE_TIMESTAMP: 384d9b17
>
> STACK_COMMAND: kb
>
> BUCKET_ID: 0x9F_nt!IoBuildPoDeviceNotifyList+274
>
> Followup: MachineOwner
> ---------
>
>
>
>

Probable cause: something is ill with your DO_POWER_PAGABLE flag handling.

The Law is:

  • if any DO in the attachment stack has this flag set, then all of the
    above DOs must also have it set.

The reason is that the kernel checks this flag on the topmost device in the
stack before sending the power IRP, and it influences whether the power IRP can
be send on DISPATCH, or PASSIVE is required. This is the main purpose of this
flag - if it is set, then the kernel is forced to send power IRPs on PASSIVE
only - thus the driver can have MJ_POWER path in pageable section.

If the topmost device had the flag UNset - then the kernel can send power
IRP on DISPATCH.

Now, if the above law (The Law) is violated, then the MJ_POWER path of the
upper DO can be called on DISPATCH, and thus PoCallDriver too. Then
PoCallDriver will need to call the lower DOs’ MJ_POWER on PASSIVE, and it does
not support this and thus a BSOD.

In fact, there is no need in this flag in modern OSes - the memory is not
scarce now. If the whole stack belongs to you - just do not use this flag
anywhere. But, nevertheless, it can be used by some device objects you’re
attaching to - some PDOs or FDOs created by MS’s modules and so on.

So, to avoid violating The Law, you must check the flag on the lower DO
just before attach, and set it in your DO if it is set in the below DO.

One more issue is the gymnastics made by the disk stacks which hold
page/hibernation files. They change the state of this flag on
MN_DEVICE_USAGE_NOTIFICATION PnP IRP, the rule is - the disk device stack which
holds a page or hibernation file cannot have pageable power paths. So, your
filter must also participate in it. I believe DiskPerf sample is correct in
this aspect. Anyway this is well-documented in MSDN.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Shalini”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, December 15, 2004 7:43 PM
Subject: [ntdev] DRIVER_POWER_STATE_FAILURE Problem.

> Hello Gurus,
>
> When ever i shutdown/restart my system or when i make a check disk at boot
> up which automatically restarts a system after checkdisk i get this strange
> bugcheck.
> The first Parameter is 0x00000100.
> This happens only in Windows 2000 and not in XP. The Bugcheck text is at the
> bottom of this email.
> Has anyone encountered this.
> Can anyone point out whats really wrong?
> Thanks a lot in Advance.
>
> Regards
> Shal
>
>
> MYDriver Shutdown Command Received
>
> Fatal System Error: 0x0000009f
> (0x00000100,0x84DCC030,0x84DCC030,0x84DC4D90)
>
> Break instruction exception - code 80000003 (first chance)
>
> A fatal system error has occurred.
> Debugger entered on first try; Bugcheck callbacks have not been invoked.
>
> A fatal system error has occurred.
>
> Connected to Windows 2000 2195 x86 compatible target, ptr64 FALSE
> Loading Kernel Symbols
> …
> Loading unloaded module list
> No unloaded module list present
> Loading User Symbols
> …
>

>
>
> * Bugcheck Analysis
>
>
>
>

>
> Use !analyze -v to get detailed debugging information.
>
> BugCheck 9F, {100, 84dcc030, 84dcc030, 84dc4d90}
>
> Probably caused by : ntoskrnl.exe ( nt!IoBuildPoDeviceNotifyList+274 )
>
> Followup: MachineOwner
> ---------
>
> nt!RtlpBreakWithStatusInstruction:
> 80452e70 cc int 3
> kd> !analyze -v
>
*****************************************************************************
> *
> *
> * Bugcheck Analysis
> *
> *
> *
>
*******************************************************************************
>
> DRIVER_POWER_STATE_FAILURE (9f)
> A driver is causing an inconsistent power state.
> Arguments:
> Arg1: 00000100, SubCode
> Arg2: 84dcc030
> Arg3: 84dcc030
> Arg4: 84dc4d90
>
> Debugging Details:
> ------------------
>
>
> DRVPOWERSTATE_SUBCODE: 100
>
> DRIVER_OBJECT: 84dc4d90
>
> DEVICE_OBJECT: 84dcc030
>
> DEFAULT_BUCKET_ID: DRIVER_FAULT
>
> BUGCHECK_STR: 0x9F
>
> LAST_CONTROL_TRANSFER: from 8042bcb9 to 80452e70
>
> STACK_TEXT:
> eb8f36ec 8042bcb9 00000003 eb8f3734 00000100
> nt!RtlpBreakWithStatusInstruction
> eb8f371c 8042c068 00000003 84c284bc 84c302e8 nt!KiBugCheckDebugBreak+0x31
> eb8f3aa4 80483310 00000000 00000100 84dcc030 nt!KeBugCheckEx+0x37b
> eb8f3ae4 804890ed 84c284ac 00000001 00000000
> nt!IoBuildPoDeviceNotifyList+0x274
> eb8f3b04 80488c70 00000000 eb8f3bf4 eb8f3c78
> nt!PopSetDevicesSystemState+0x85
> eb8f3be0 80461691 00000005 00000004 c0000004 nt!NtSetSystemPowerState+0x320
> eb8f3be0 804014d5 00000005 00000004 c0000004 nt!KiSystemService+0xc4
> eb8f3c64 804889c3 00000005 00000004 c0000004 nt!ZwSetSystemPowerState+0xb
> eb8f3d48 804c61a9 00000005 00000004 c0000004 nt!NtSetSystemPowerState+0x70
> eb8f3d58 80461691 00000001 8944e220 92140464 nt!NtShutdownSystem+0x2e
> eb8f3d58 77f9a5bd 00000001 8944e220 92140464 nt!KiSystemService+0xc4
> 0006e664 010057a4 00000001 00072d88 00000000 ntdll!NtShutdownSystem+0xb
> 0006e69c 010355b1 00000000 0006fef8 01001848 autochk!IFS_SYSTEM::Reboot+0x64
> 0006fbd0 0100977e 00000101 00072d01 00000000
> autochk!NTFS_SA::VerifyAndFix+0x1cc4
> 0006fc34 010033a9 00000001 00072d88 00000006
> autochk!VOL_LIODPDRV::ChkDsk+0x4f
> 0006fd50 01002d2d 0006fee0 0006fefc 00000006 autochk!InvokeAutoChk+0x400
> 0006ffb4 0104cd45 00000003 00072430 00072440 autochk!main+0x845
> 0006fff4 00000000 7ffdf000 000000c8 00000100 autochk!NtProcessStartup+0x18d
>
>
> FOLLOWUP_IP:
> nt!IoBuildPoDeviceNotifyList+274
> 80483310 8b55ec mov edx,[ebp-0x14]
>
> SYMBOL_STACK_INDEX: 3
>
> FOLLOWUP_NAME: MachineOwner
>
> SYMBOL_NAME: nt!IoBuildPoDeviceNotifyList+274
>
> MODULE_NAME: nt
>
> IMAGE_NAME: ntoskrnl.exe
>
> DEBUG_FLR_IMAGE_TIMESTAMP: 384d9b17
>
> STACK_COMMAND: kb
>
> BUCKET_ID: 0x9F_nt!IoBuildPoDeviceNotifyList+274
>
> Followup: MachineOwner
> ---------
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>