NtSetSystemPowerState Crash upon start

hi all,

Once in a while when I reboot, I get this bugcheck upon startup. Not sure how my driver is linked with this. Also, it doesn’t happen all the time.

1: kd> !analyze -v
Connected to Windows 7 7600 x64 target at (Tue Sep 24 08:16:23.358 2013 (UTC - 7:00)), ptr64 TRUE
Loading Kernel Symbols


Loading User Symbols

Loading unloaded module list
…Unable to enumerate user-mode unloaded modules, Win32 error 0n30
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

Unknown bugcheck code (c0000145)
Unknown bugcheck description
Arguments:
Arg1: ffffffffc0000005
Arg2: 0000000000000000
Arg3: 0000000000000000
Arg4: 0000000000000000

Debugging Details:

BUGCHECK_STR: 0xc0000145

ERROR_CODE: (NTSTATUS) 0xc0000145 - {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.

EXCEPTION_CODE: (NTSTATUS) 0xc0000145 - {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.

EXCEPTION_PARAMETER1: ffffffffc0000005

EXCEPTION_PARAMETER2: 0000000000000000

EXCEPTION_PARAMETER3: 0000000000000000

EXCEPTION_PARAMETER4: 0

DEFAULT_BUCKET_ID: WIN7_DRIVER_FAULT

PROCESS_NAME: System

CURRENT_IRQL: 2

LAST_CONTROL_TRANSFER: from fffff800034dc420 to fffff80003674060

STACK_TEXT:
fffff880039c7e98 fffff800034dc420 : 0000000040000082 000000000000004c 0000000000000000 0000000000000001 : nt!DbgBreakPointWithStatus
fffff880039c7ea0 fffff800034dd138 : fffff88000000003 fffff88000000000 fffffa800effad70 0000000000000000 : nt!KiBugCheckDebugBreak+0x14
fffff880039c7f10 fffff8000366fd74 : fffff8800000004c 00000000c0000145 fffff88005338498 fffffa800d2ad0d0 : nt!KeBugCheck2+0x7c8
fffff880039c85c0 fffff80003c5768f : 000000000000004c 00000000c0000145 fffff88005338498 fffffa800d2ad0d0 : nt!KeBugCheckEx+0x104
fffff880039c8600 fffff80003c5c700 : 0000000000000000 fffff8000346e001 0000000000000002 fffff880039c8684 : nt!PopGracefulShutdown+0x3df
fffff880039c8650 fffff80003678e13 : ffffffff00000004 fffff80000000004 fffffa80e0000004 fffffa800fae01e0 : nt!NtSetSystemPowerState+0xb1c
fffff880039c87a0 fffff80003672a40 : fffff80003f5123d 0000000000000004 0000000000000004 00000000e0000004 : nt!KiSystemServiceCopyEnd+0x13
fffff880039c8938 fffff80003f5123d : 0000000000000004 0000000000000004 00000000e0000004 0000000000000000 : nt!KiServiceLinkage
fffff880039c8940 fffff80003f50aa1 : 0000000000000000 fffffa8000000004 fffff88000000004 00000000c0000004 : nt!PopIssueActionRequest+0x349
fffff880039c8a70 fffff800035dfb71 : 0000000000000001 0000000000000000 0000000000000000 fffff880039c8b78 : nt!PopPolicyWorkerAction+0x69
fffff880039c8ad0 fffff800036507c6 : 0000000080000000 fffff800035df9a0 fffff80003ae8bf8 fffffa800fae01e0 : nt!PopPolicyWorkerThread+0x1d1
fffff880039c8b40 fffff80003f7da3d : 0000000080000001 fffffa800fae01e0 0000000000000080 0000000000000000 : nt!ExpWorkerThread+0x156
fffff880039c8bd0 fffff80003673a26 : fffff80003650670 0000000080000001 fffff88003300180 fffff8800163cea0 : nt!PspSystemThreadStartup+0x1a9
fffff880039c8c40 0000000000000000 : fffff880039c9000 fffff880039c3000 fffff880039c8130 0000000000000000 : nt!KiStartSystemThread+0x16

STACK_COMMAND: kb

FOLLOWUP_IP:
nt!NtSetSystemPowerState+b1c
fffff800`03c5c700 cc int 3

SYMBOL_STACK_INDEX: 5

SYMBOL_NAME: nt!NtSetSystemPowerState+b1c

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: nt

IMAGE_NAME: ntkrnlmp.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bcdf1

FAILURE_BUCKET_ID: X64_0xc0000145_nt!NtSetSystemPowerState+b1c

BUCKET_ID: X64_0xc0000145_nt!NtSetSystemPowerState+b1c

Followup: MachineOwner

Any pointers?

thanks,
Venkat

This looks like an assertion or debug break in the kernel.
Does your driver pass the verifier?
If yes, enable more system debug prints or even use checked build.
– pa

On 24-Sep-2013 18:21, xxxxx@yahoo.com wrote:

hi all,

Once in a while when I reboot, I get this bugcheck upon startup. Not sure how my driver is linked with this. Also, it doesn’t happen all the time.

1: kd> !analyze -v
Connected to Windows 7 7600 x64 target at (Tue Sep 24 08:16:23.358 2013 (UTC - 7:00)), ptr64 TRUE
Loading Kernel Symbols


Loading User Symbols

Loading unloaded module list
…Unable to enumerate user-mode unloaded modules, Win32 error 0n30
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************

Unknown bugcheck code (c0000145)
Unknown bugcheck description
Arguments:
Arg1: ffffffffc0000005
Arg2: 0000000000000000
Arg3: 0000000000000000
Arg4: 0000000000000000

Debugging Details:

BUGCHECK_STR: 0xc0000145

ERROR_CODE: (NTSTATUS) 0xc0000145 - {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.

EXCEPTION_CODE: (NTSTATUS) 0xc0000145 - {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.

EXCEPTION_PARAMETER1: ffffffffc0000005

EXCEPTION_PARAMETER2: 0000000000000000

EXCEPTION_PARAMETER3: 0000000000000000

EXCEPTION_PARAMETER4: 0

DEFAULT_BUCKET_ID: WIN7_DRIVER_FAULT

PROCESS_NAME: System

CURRENT_IRQL: 2

LAST_CONTROL_TRANSFER: from fffff800034dc420 to fffff80003674060

STACK_TEXT:
fffff880039c7e98 fffff800034dc420 : 0000000040000082 000000000000004c 0000000000000000 0000000000000001 : nt!DbgBreakPointWithStatus
fffff880039c7ea0 fffff800034dd138 : fffff88000000003 fffff88000000000 fffffa800effad70 0000000000000000 : nt!KiBugCheckDebugBreak+0x14
fffff880039c7f10 fffff8000366fd74 : fffff8800000004c 00000000c0000145 fffff88005338498 fffffa800d2ad0d0 : nt!KeBugCheck2+0x7c8
fffff880039c85c0 fffff80003c5768f : 000000000000004c 00000000c0000145 fffff88005338498 fffffa800d2ad0d0 : nt!KeBugCheckEx+0x104
fffff880039c8600 fffff80003c5c700 : 0000000000000000 fffff8000346e001 0000000000000002 fffff880039c8684 : nt!PopGracefulShutdown+0x3df
fffff880039c8650 fffff80003678e13 : ffffffff00000004 fffff80000000004 fffffa80e0000004 fffffa800fae01e0 : nt!NtSetSystemPowerState+0xb1c
fffff880039c87a0 fffff80003672a40 : fffff80003f5123d 0000000000000004 0000000000000004 00000000e0000004 : nt!KiSystemServiceCopyEnd+0x13
fffff880039c8938 fffff80003f5123d : 0000000000000004 0000000000000004 00000000e0000004 0000000000000000 : nt!KiServiceLinkage
fffff880039c8940 fffff80003f50aa1 : 0000000000000000 fffffa8000000004 fffff88000000004 00000000c0000004 : nt!PopIssueActionRequest+0x349
fffff880039c8a70 fffff800035dfb71 : 0000000000000001 0000000000000000 0000000000000000 fffff880039c8b78 : nt!PopPolicyWorkerAction+0x69
fffff880039c8ad0 fffff800036507c6 : 0000000080000000 fffff800035df9a0 fffff80003ae8bf8 fffffa800fae01e0 : nt!PopPolicyWorkerThread+0x1d1
fffff880039c8b40 fffff80003f7da3d : 0000000080000001 fffffa800fae01e0 0000000000000080 0000000000000000 : nt!ExpWorkerThread+0x156
fffff880039c8bd0 fffff80003673a26 : fffff80003650670 0000000080000001 fffff88003300180 fffff8800163cea0 : nt!PspSystemThreadStartup+0x1a9
fffff880039c8c40 0000000000000000 : fffff880039c9000 fffff880039c3000 fffff880039c8130 0000000000000000 : nt!KiStartSystemThread+0x16

STACK_COMMAND: kb

FOLLOWUP_IP:
nt!NtSetSystemPowerState+b1c
fffff800`03c5c700 cc int 3

SYMBOL_STACK_INDEX: 5

SYMBOL_NAME: nt!NtSetSystemPowerState+b1c

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: nt

IMAGE_NAME: ntkrnlmp.exe

DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bcdf1

FAILURE_BUCKET_ID: X64_0xc0000145_nt!NtSetSystemPowerState+b1c

BUCKET_ID: X64_0xc0000145_nt!NtSetSystemPowerState+b1c

Followup: MachineOwner

Any pointers?

thanks,
Venkat