Hi,
I am running into a problem of follwoing BSOD, when I tries to use thread created using PsCreateSystemThread. It seems to work, but eventually gets a BSOD, I am not able to get any clue what's wrong here. I see this is called at very high IRQL d at the time of BSOD, for normal operation it is called at LOW_LEVEL 0. I expetcs system to call my thread at passive level all the time. I have no clue why it is happening.
Information about the threads:
I am creating one thread per core of the system processor by assiging the affinity to a specific core. The thread is initialized using the SynchronizationEvent. I can provide more information if needed to debug this issue.
The BSOD is:
5: kd> !analyze -v
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
IRQL_NOT_LESS_OR_EQUAL (a)
An attempt was made to access a pageable (or completely invalid) address at an
interrupt request level (IRQL) that is too high. This is usually
caused by drivers using improper addresses.
If a kernel debugger is available get the stack backtrace.
Arguments:
Arg1: ffffcb0015c72260, memory referenced
Arg2: 000000000000000d, IRQL
Arg3: 0000000000000000, bitfield :
bit 0 : value 0 = read operation, 1 = write operation
bit 3 : value 0 = not an execute operation, 1 = execute operation (only on chips which support this level of status)
Arg4: fffff8000166acc2, address which referenced memory
Debugging Details:
READ_ADDRESS: ffffcb0015c72260
CURRENT_IRQL: d
FAULTING_IP:
nt!KdPollBreakIn+d1
fffff800`0166acc2 4c8b44fd00 mov r8,qword ptr [rbp+rdi*8]
DEFAULT_BUCKET_ID: VISTA_DRIVER_FAULT
BUGCHECK_STR: 0xA
PROCESS_NAME: System
TRAP_FRAME: fffffa60028a4890 -- (.trap 0xfffffa60028a4890)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=0000000000000001 rbx=fffffa80077f9018 rcx=ffffffffffd0d000
rdx=0000000000000000 rsi=0000000000000000 rdi=0000000100000000
rip=fffff8000166acc2 rsp=fffffa60028a4a20 rbp=fffff800018051e0
r8=0000000000000000 r9=0000000000000000 r10=0000000000000000
r11=000000000000000c r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0 nv up di pl zr na po nc
nt!KdPollBreakIn+0xd1:
fffff8000166acc2 4c8b44fd00 mov r8,qword ptr [rbp+rdi*8] ss:0018:fffff808018051e0=????????????????
Resetting default scope
LAST_CONTROL_TRANSFER: from fffff80001713c72 to fffff8000165b860
STACK_TEXT:
fffffa60028a4038 fffff80001713c72 : fffffa8007c3ebb0 0000000000000065 ffffcb0015c72260 fffff80001626c38 : nt!RtlpBreakWithStatusInstruction
fffffa60028a4040 fffff80001714a2b : ffffcb0000000003 0000000000000000 fffff800016a1d90 000000000000000a : nt!KiBugCheckDebugBreak+0x12
fffffa60028a40a0 fffff80001661494 : 0000000000000000 fffffa60034b18e2 fffffa8008daa106 fffff8000024ffff : nt!KeBugCheck2+0x6eb
fffffa60028a4710 fffff8000166112e : 000000000000000a ffffcb0015c72260 000000000000000d 0000000000000000 : nt!KeBugCheckEx+0x104
fffffa60028a4750 fffff8000166000b : 0000000000000000 fffffa8007790048 0000000100000000 0000000000000001 : nt!KiBugCheckDispatch+0x6e
fffffa60028a4890 fffff8000166acc2 : 0000000000000001 fffff800018051e0 0000000000026100 0000000000000000 : nt!KiPageFault+0x20b
fffffa60028a4a20 fffff80001669e3a : fffffa60018af180 fffffa60028a4aa0 0000000000026160 fffffa8007c3ebb0 : nt!KdPollBreakIn+0xd1
fffffa60028a4a60 fffff8000165afef : 0000000000000000 fffffa60028a4b20 fffffa8007b42158 fffffa8007c3eca8 : nt!KeUpdateRunTime+0x14a
fffffa60028a4aa0 fffff800016681dd : 0000000000000000 0000000000000100 0000000000000005 fffffa8000000009 : nt!KiSecondaryClockInterrupt+0x11f
fffffa60028a4c30 fffffa600346f3b3 : fffffa8000000000 fffffa8000000000 fffffa80077f9700 fffffa8003989c00 : nt!KeWaitForSingleObject+0x12d
fffffa60028a4cc0 fffff80001884de3 : fffffa80077f9720 0000000000000000 0000000000000000 0000000000000001 : ifM60x64!VmpSCQThread+0x1b3 [c:\cvs-directory\fcoe\fcoe_windows_driver\vmp\mp_io.c @ 5791]
fffffa60028a4d50 fffff8000169b536 : fffffa600198d180 fffffa8007c3ebb0 fffffa6001996d40 0000000000000001 : nt!PspSystemThreadStartup+0x57
fffffa60028a4d80 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : nt!KiStartSystemThread+0x16
STACK_COMMAND: kb
FOLLOWUP_IP:
ifM60x64!VmpSCQThread+1b3 [c:\cvs-directory\fcoe\fcoe_windows_driver\vmp\mp_io.c @ 5791]
fffffa60`0346f3b3 8944244c mov dword ptr [rsp+4Ch],eax
FAULTING_SOURCE_CODE:
5786: Status = KeWaitForSingleObject(((PVOID)((volatile void *)&(((PQ_THREAD)Context)->Event))),
5787: Executive, KernelMode, FALSE, NULL);
5788: if (Status != STATUS_SUCCESS)
5789: {
5792: break;//ERROR
5793: }
5794:
SYMBOL_STACK_INDEX: a
SYMBOL_NAME: ifM60x64!VmpSCQThread+1b3
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: ifM60x64
IMAGE_NAME: ifM60x64.sys
DEBUG_FLR_IMAGE_TIMESTAMP: 491f371f
FAILURE_BUCKET_ID: X64_0xA_ifM60x64!VmpSCQThread+1b3
BUCKET_ID: X64_0xA_ifM60x64!VmpSCQThread+1b3
Followup: MachineOwner
-Tarun