When Process Hang how to figure out?

I am making a USB audio filter driver and below is the basic framework. Somehow, I didn’t get any problem in a single-core machine but have the computer is hung in a Dual-core machine. Actually, I don’t know whether it is the matter of number of core problem or not yet.( I need to spend more time on it to figure out .)

I got the degugging message “Leaving Process() Pre-entered!” from this driver and hung, which didn’t happen in a single-core machine.

Another question is that, thanks for in advance though, when the process is hung, in this case it is coolpro2.exe, where do I start first to figure out what’s going on this? I put the output of

!process coolpro2.exe.

How do I interpret this information?

Thank you again.

// DISPATCH :
case IOCTL_INTERNAL_USB_SUBMIT_URB:
return ForwardWithCompletionRoutine(Irp, ReadCompletionRoutine, NULL);

// COMPLETION ROUTINE :
NTSTATUS ReadCompletionRoutine()
{
Process();
}

// Function
void Process()
{
if (InterlockedIncrement(&m_ReEntered) > 1) {
InterlockedDecrement(&m_ReEntered);
KdPrint((DRIVERNAME " - Leaving Process() Pre-entered!\n"));
return;
}
}

!process 8209e020
PROCESS 8209e020 SessionId: 0 Cid: 0e58 Peb: 7ffd4000 ParentCid: 0230
DirBase: 035005e0 ObjectTable: e12a4d80 HandleCount: 503.
Image: coolpro2.exe
VadRoot 81fd6a10 Vads 330 Clone 0 Private 12196. Modified 59. Locked 112.
DeviceMap e202a278
Token e10629c0
ElapsedTime 00:17:10.562
UserTime 00:00:00.765
KernelTime 00:00:01.250
QuotaPoolUsage[PagedPool] 78828
QuotaPoolUsage[NonPagedPool] 13200
Working Set Sizes (now,min,max) (12963, 2176, 4224) (51852KB, 8704KB, 16896KB)
PeakWorkingSetSize 12963
VirtualSize 87 Mb
PeakVirtualSize 88 Mb
PageFaultCount 14981
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 12262

THREAD 827519c0 Cid 0e58.0e5c Teb: 7ffdf000 Win32Thread: e2f35d18 WAIT: (Executive) KernelMode Non-Alertable
SuspendCount 2
81fdca5c NotificationEvent
IRP List:
82cb5008: (0006,0220) Flags: 00000034 Mdl: 00000000
82cacde0: (0006,0220) Flags: 00000034 Mdl: 00000000
82cac008: (0006,0220) Flags: 00000070 Mdl: 00000000
82c1dde0: (0006,0220) Flags: 00000000 Mdl: 81fbf330
82752008: (0006,0220) Flags: 00000070 Mdl: 00000000
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 30659 LargeStack
UserTime 00:00:00.0562
KernelTime 00:00:01.0125
Win32 Start Address 0x00d21980
Start Address 0x7c810665
Stack Init a7037000 Current a70366d4 Base a7037000 Limit a7031000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
a70366ec 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a70366f8 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a7036720 a786a4e5 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7036748 a786fd6a usbaudio!USBAudioPinWaitForStarvation+0x45 (FPO: [Non-Fpo])
a7036764 a786a2d7 usbaudio!CaptureStateChange+0x64 (FPO: [Non-Fpo])
a7036780 f7d7844d usbaudio!USBAudioPinSetDeviceState+0x1f (FPO: [Non-Fpo])
WARNING: Frame IP not in any known module. Following frames may be wrong.
a70367a0 f7d79c70 0xf7d7844d
a70367c4 f7d7aac1 0xf7d79c70
a70367e4 f7d79b57 0xf7d7aac1
a7036808 f7d79faf 0xf7d79b57
a7036928 80818163 0xf7d79faf
a7036930 82cb5008 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
a7036934 82cb5008 0x82cb5008
a7036938 f7d67c47 0x82cb5008
a703693c a7cc2a8c 0xf7d67c47
a7036940 a70369a4 0xa7cc2a8c
a7036944 e108e6a0 0xa70369a4
a7036a94 8086dc44 0xe108e6a0
00000000 00000000 nt!KiUnlockDispatcherDatabase+0x1c

THREAD 828a6750 Cid 0e58.0e70 Teb: 7ffde000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
828a68ec Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6d38000 Current a6d378c0 Base a6d38000 Limit a6d35000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6d378d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6d378e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6d3790c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6d37924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6d3796c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6d37984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6d379bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a6d37d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a6d37d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6d37d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
012dfef4 00000000 0x7c90eb94

THREAD 81fafda8 Cid 0e58.0e78 Teb: 7ffdc000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81faff44 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x72d230e8
Start Address 0x7c810659
Stack Init a7d6d000 Current a7d6c8c0 Base a7d6d000 Limit a7d6a000 Call 0
Priority 15 BasePriority 15 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a7d6c8d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a7d6c8e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a7d6c90c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7d6c924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a7d6c96c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a7d6c984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a7d6c9bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a7d6cd48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a7d6cd48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a7d6cd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
0190ff6c 00000000 0x7c90eb94

THREAD 8205ea10 Cid 0e58.0e7c Teb: 7ffdb000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
8205ebac Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 9
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0050efb0
Start Address 0x7c810659
Stack Init a76dd000 Current a76dcc00 Base a76dd000 Limit a76da000 Call 0
Priority 11 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a76dcc18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a76dcc24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a76dcc4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76dcc64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a76dccac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a76dccc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a76dccec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76dcd50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a76dcd50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a76dcd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01c4fe4c 00000000 0x7c90eb94

THREAD 82013020 Cid 0e58.0e80 Teb: 7ffda000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
820131bc Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a7996000 Current a79958c0 Base a7996000 Limit a7993000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a79958d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a79958e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a799590c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7995924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a799596c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a7995984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a79959bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a7995d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a7995d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a7995d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01d4ff1c 00000000 0x7c90eb94

THREAD 81fb3188 Cid 0e58.0e84 Teb: 7ffd9000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81fb3324 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a76d5000 Current a76d48c0 Base a76d5000 Limit a76d2000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a76d48d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a76d48e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a76d490c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76d4924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a76d496c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a76d4984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a76d49bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a76d4d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a76d4d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a76d4d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01e4fec0 00000000 0x7c90eb94

THREAD 81fb35a0 Cid 0e58.05d4 Teb: 7ffd8000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81fb373c Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6d1c000 Current a6d1b8c0 Base a6d1c000 Limit a6d19000 Call 0
Priority 11 BasePriority 9 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6d1b8d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6d1b8e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6d1b90c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6d1b924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6d1b96c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6d1b984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6d1b9bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a6d1bd48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a6d1bd48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6d1bd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01f4fe8c 00000000 0x7c90eb94

THREAD 82767c10 Cid 0e58.05b8 Teb: 7ffd7000 Win32Thread: e138e008 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
82767dac Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 1414 LargeStack
UserTime 00:00:00.0015
KernelTime 00:00:00.0015
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6cc4000 Current a6cc3c00 Base a6cc4000 Limit a6cc0000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6cc3c18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6cc3c24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6cc3c4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6cc3c64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6cc3cac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6cc3cc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6cc3cec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6cc3d50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a6cc3d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6cc3d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
0340fed8 00000000 0x7c90eb94

THREAD 82087020 Cid 0e58.0260 Teb: 7ffdd000 Win32Thread: e1396d68 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
820871bc Semaphore Limit 0x2
IRP List:
821d08f0: (0006,0220) Flags: 00000000 Mdl: 82dfa738
81eeec28: (0006,0220) Flags: 00000070 Mdl: 00000000
81ec0008: (0006,0220) Flags: 00000000 Mdl: 820c87c8
82c17008: (0006,0220) Flags: 00000070 Mdl: 00000000
820b3008: (0006,0220) Flags: 00000000 Mdl: 82d7d240
81ff8008: (0006,0220) Flags: 00000070 Mdl: 00000000
827e2008: (0006,0220) Flags: 00000000 Mdl: 8286e4a0
81ee0008: (0006,0220) Flags: 00000070 Mdl: 00000000
82121de0: (0006,0220) Flags: 00000000 Mdl: 81fdde00
820bcde0: (0006,0220) Flags: 00000070 Mdl: 00000000
8207dde0: (0006,0220) Flags: 00000000 Mdl: 82ccb9a0
81ecc818: (0006,0220) Flags: 00000070 Mdl: 00000000
82085008: (0006,0220) Flags: 00000000 Mdl: 81fbcbe0
82af8a28: (0006,0220) Flags: 00000070 Mdl: 00000000
81eee008: (0006,0220) Flags: 00000000 Mdl: 81ee4d90
820a19f8: (0006,0220) Flags: 00000070 Mdl: 00000000
81f5e008: (0006,0220) Flags: 00000000 Mdl: 81fed930
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 107 LargeStack
UserTime 00:00:00.0031
KernelTime 00:00:00.0000
Win32 Start Address 0x0067b497
Start Address 0x7c810659
Stack Init a6872000 Current a6871c00 Base a6872000 Limit a686f000 Call 0
Priority 11 BasePriority 9 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a6871c18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6871c24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6871c4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6871c64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6871cac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6871cc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6871cec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6871d50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a6871d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6871d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
046afe80 00000000 0x7c90eb94

THREAD 821db6a8 Cid 0e58.00cc Teb: 7ffd6000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
821db844 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 13
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x72d2457b
Start Address 0x7c810659
Stack Init a720f000 Current a720ec00 Base a720f000 Limit a720c000 Call 0
Priority 15 BasePriority 15 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a720ec18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a720ec24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a720ec4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a720ec64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a720ecac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a720ecc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a720ecec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a720ed50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a720ed50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a720ed64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
049aff84 00000000 0x7c90eb94

0: kd> !process 8209e020
PROCESS 8209e020 SessionId: 0 Cid: 0e58 Peb: 7ffd4000 ParentCid: 0230
DirBase: 035005e0 ObjectTable: e12a4d80 HandleCount: 503.
Image: coolpro2.exe
VadRoot 81fd6a10 Vads 330 Clone 0 Private 12196. Modified 59. Locked 112.
DeviceMap e202a278
Token e10629c0
ElapsedTime 00:17:10.562
UserTime 00:00:00.765
KernelTime 00:00:01.250
QuotaPoolUsage[PagedPool] 78828
QuotaPoolUsage[NonPagedPool] 13200
Working Set Sizes (now,min,max) (12963, 2176, 4224) (51852KB, 8704KB, 16896KB)
PeakWorkingSetSize 12963
VirtualSize 87 Mb
PeakVirtualSize 88 Mb
PageFaultCount 14981
MemoryPriority BACKGROUND
BasePriority 8
CommitCharge 12262

THREAD 827519c0 Cid 0e58.0e5c Teb: 7ffdf000 Win32Thread: e2f35d18 WAIT: (Executive) KernelMode Non-Alertable
SuspendCount 2
81fdca5c NotificationEvent
IRP List:
82cb5008: (0006,0220) Flags: 00000034 Mdl: 00000000
82cacde0: (0006,0220) Flags: 00000034 Mdl: 00000000
82cac008: (0006,0220) Flags: 00000070 Mdl: 00000000
82c1dde0: (0006,0220) Flags: 00000000 Mdl: 81fbf330
82752008: (0006,0220) Flags: 00000070 Mdl: 00000000
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 30659 LargeStack
UserTime 00:00:00.0562
KernelTime 00:00:01.0125
Win32 Start Address 0x00d21980
Start Address 0x7c810665
Stack Init a7037000 Current a70366d4 Base a7037000 Limit a7031000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 16
ChildEBP RetAddr
a70366ec 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a70366f8 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a7036720 a786a4e5 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7036748 a786fd6a usbaudio!USBAudioPinWaitForStarvation+0x45 (FPO: [Non-Fpo])
a7036764 a786a2d7 usbaudio!CaptureStateChange+0x64 (FPO: [Non-Fpo])
a7036780 f7d7844d usbaudio!USBAudioPinSetDeviceState+0x1f (FPO: [Non-Fpo])
WARNING: Frame IP not in any known module. Following frames may be wrong.
a70367a0 f7d79c70 0xf7d7844d
a70367c4 f7d7aac1 0xf7d79c70
a70367e4 f7d79b57 0xf7d7aac1
a7036808 f7d79faf 0xf7d79b57
a7036928 80818163 0xf7d79faf
a7036930 82cb5008 nt!IopfCallDriver+0x31 (FPO: [0,0,0])
a7036934 82cb5008 0x82cb5008
a7036938 f7d67c47 0x82cb5008
a703693c a7cc2a8c 0xf7d67c47
a7036940 a70369a4 0xa7cc2a8c
a7036944 e108e6a0 0xa70369a4
a7036a94 8086dc44 0xe108e6a0
00000000 00000000 nt!KiUnlockDispatcherDatabase+0x1c

THREAD 828a6750 Cid 0e58.0e70 Teb: 7ffde000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
828a68ec Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6d38000 Current a6d378c0 Base a6d38000 Limit a6d35000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6d378d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6d378e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6d3790c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6d37924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6d3796c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6d37984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6d379bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a6d37d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a6d37d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6d37d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
012dfef4 00000000 0x7c90eb94

THREAD 81fafda8 Cid 0e58.0e78 Teb: 7ffdc000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81faff44 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x72d230e8
Start Address 0x7c810659
Stack Init a7d6d000 Current a7d6c8c0 Base a7d6d000 Limit a7d6a000 Call 0
Priority 15 BasePriority 15 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a7d6c8d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a7d6c8e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a7d6c90c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7d6c924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a7d6c96c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a7d6c984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a7d6c9bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a7d6cd48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a7d6cd48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a7d6cd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
0190ff6c 00000000 0x7c90eb94

THREAD 8205ea10 Cid 0e58.0e7c Teb: 7ffdb000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
8205ebac Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 9
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0050efb0
Start Address 0x7c810659
Stack Init a76dd000 Current a76dcc00 Base a76dd000 Limit a76da000 Call 0
Priority 11 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a76dcc18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a76dcc24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a76dcc4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76dcc64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a76dccac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a76dccc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a76dccec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76dcd50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a76dcd50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a76dcd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01c4fe4c 00000000 0x7c90eb94

THREAD 82013020 Cid 0e58.0e80 Teb: 7ffda000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
820131bc Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a7996000 Current a79958c0 Base a7996000 Limit a7993000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a79958d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a79958e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a799590c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a7995924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a799596c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a7995984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a79959bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a7995d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a7995d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a7995d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01d4ff1c 00000000 0x7c90eb94

THREAD 81fb3188 Cid 0e58.0e84 Teb: 7ffd9000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81fb3324 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a76d5000 Current a76d48c0 Base a76d5000 Limit a76d2000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a76d48d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a76d48e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a76d490c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a76d4924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a76d496c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a76d4984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a76d49bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a76d4d48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a76d4d48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a76d4d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01e4fec0 00000000 0x7c90eb94

THREAD 81fb35a0 Cid 0e58.05d4 Teb: 7ffd8000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
81fb373c Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 5
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6d1c000 Current a6d1b8c0 Base a6d1c000 Limit a6d19000 Call 0
Priority 11 BasePriority 9 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6d1b8d8 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6d1b8e4 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6d1b90c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6d1b924 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6d1b96c 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6d1b984 80823d68 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6d1b9bc 808e84a9 nt!KeWaitForMultipleObjects+0x284 (FPO: [Non-Fpo])
a6d1bd48 808699ac nt!NtWaitForMultipleObjects+0x297 (FPO: [Non-Fpo])
a6d1bd48 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6d1bd64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
01f4fe8c 00000000 0x7c90eb94

THREAD 82767c10 Cid 0e58.05b8 Teb: 7ffd7000 Win32Thread: e138e008 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
82767dac Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 1414 LargeStack
UserTime 00:00:00.0015
KernelTime 00:00:00.0015
Win32 Start Address 0x0067be98
Start Address 0x7c810659
Stack Init a6cc4000 Current a6cc3c00 Base a6cc4000 Limit a6cc0000 Call 0
Priority 10 BasePriority 8 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a6cc3c18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6cc3c24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6cc3c4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6cc3c64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6cc3cac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6cc3cc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6cc3cec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6cc3d50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a6cc3d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6cc3d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
0340fed8 00000000 0x7c90eb94

THREAD 82087020 Cid 0e58.0260 Teb: 7ffdd000 Win32Thread: e1396d68 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
820871bc Semaphore Limit 0x2
IRP List:
821d08f0: (0006,0220) Flags: 00000000 Mdl: 82dfa738
81eeec28: (0006,0220) Flags: 00000070 Mdl: 00000000
81ec0008: (0006,0220) Flags: 00000000 Mdl: 820c87c8
82c17008: (0006,0220) Flags: 00000070 Mdl: 00000000
820b3008: (0006,0220) Flags: 00000000 Mdl: 82d7d240
81ff8008: (0006,0220) Flags: 00000070 Mdl: 00000000
827e2008: (0006,0220) Flags: 00000000 Mdl: 8286e4a0
81ee0008: (0006,0220) Flags: 00000070 Mdl: 00000000
82121de0: (0006,0220) Flags: 00000000 Mdl: 81fdde00
820bcde0: (0006,0220) Flags: 00000070 Mdl: 00000000
8207dde0: (0006,0220) Flags: 00000000 Mdl: 82ccb9a0
81ecc818: (0006,0220) Flags: 00000070 Mdl: 00000000
82085008: (0006,0220) Flags: 00000000 Mdl: 81fbcbe0
82af8a28: (0006,0220) Flags: 00000070 Mdl: 00000000
81eee008: (0006,0220) Flags: 00000000 Mdl: 81ee4d90
820a19f8: (0006,0220) Flags: 00000070 Mdl: 00000000
81f5e008: (0006,0220) Flags: 00000000 Mdl: 81fed930
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 107 LargeStack
UserTime 00:00:00.0031
KernelTime 00:00:00.0000
Win32 Start Address 0x0067b497
Start Address 0x7c810659
Stack Init a6872000 Current a6871c00 Base a6872000 Limit a686f000 Call 0
Priority 11 BasePriority 9 PriorityDecrement 2 DecrementCount 16
ChildEBP RetAddr
a6871c18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a6871c24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a6871c4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6871c64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a6871cac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a6871cc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a6871cec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a6871d50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a6871d50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a6871d64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
046afe80 00000000 0x7c90eb94

THREAD 821db6a8 Cid 0e58.00cc Teb: 7ffd6000 Win32Thread: 00000000 WAIT: (Suspended) KernelMode Non-Alertable
SuspendCount 2
821db844 Semaphore Limit 0x2
Not impersonating
DeviceMap e202a278
Owning Process 8209e020 Image: coolpro2.exe
Wait Start TickCount 114234 Ticks: 216 (0:00:00:03.375)
Context Switch Count 13
UserTime 00:00:00.0000
KernelTime 00:00:00.0000
Win32 Start Address 0x72d2457b
Start Address 0x7c810659
Stack Init a720f000 Current a720ec00 Base a720f000 Limit a720c000 Call 0
Priority 15 BasePriority 15 PriorityDecrement 0 DecrementCount 0
ChildEBP RetAddr
a720ec18 8082be56 nt!KiSwapContext+0x2f (FPO: [Uses EBP] [0,0,4])
a720ec24 80824048 nt!KiSwapThread+0x8a (FPO: [0,0,0])
a720ec4c 8082b592 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a720ec64 80827f02 nt!KiSuspendThread+0x18 (FPO: [3,0,0])
a720ecac 8082be74 nt!KiDeliverApc+0x124 (FPO: [Non-Fpo])
a720ecc4 80824048 nt!KiSwapThread+0xa8 (FPO: [0,0,0])
a720ecec 808e81c2 nt!KeWaitForSingleObject+0x1c2 (FPO: [Non-Fpo])
a720ed50 808699ac nt!NtWaitForSingleObject+0x9a (FPO: [Non-Fpo])
a720ed50 7c90eb94 nt!KiFastCallEntry+0xfc (FPO: [0,0] TrapFrame @ a720ed64)
WARNING: Frame IP not in any known module. Following frames may be wrong.
049aff84 00000000 0x7c90eb94

xxxxx@hotmail.com wrote:

I am making a USB audio filter driver and below is the basic framework. Somehow, I didn’t get any problem in a single-core machine but have the computer is hung in a Dual-core machine. Actually, I don’t know whether it is the matter of number of core problem or not yet.( I need to spend more time on it to figure out .)

I got the degugging message “Leaving Process() Pre-entered!” from this driver and hung, which didn’t happen in a single-core machine.

Why are you protecting against Process being re-entered? There is no
reason why you couldn’t get another completion while you are processing
the first one, especially if you are doing a lot of processing in
Process, and ESPECIALLY on a multiprocessor machine. Look at the dump
– there are 5 outstanding IRPs for that thread.

What do you return from your completion handler in both cases?


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

Making a wild guess by reading between the lines (because the code you’ve posted is missing important details), you entered a completion routine for one IRP while you were in one for a second IRP, decided (incorrectly) that you therefore didn’t need to complete some IRP from Usbaudio “because I must already be processing it”.

UsbAudio is then waiting forever for you to complete the request you skipped.

Offhand, I can’t think of any good reason to be checking for or even caring about re-entrance in a completion routine (except for an incorrect driver design). The completion context is there for you to resolve issues of this sort- that’s basically why there IS a completion context.

Thank you guys,

I have followed both of you advice to proceed the processing and solved the problem very easily. Thank you so much.

Thank you again.
Because of the success process, I didn’t ask you the reason of success. Basically I got rid of the protection part of re-entering to the Process() function and it worked fine.

For my thinking was somehow if it takes too much time in processing the previous IRP, I shouldn’t let it go in the routine again. That’s why I protect it from re-entering.

Why shouldn’t I do this?

Thank you again, Tim and Bob

>>
For my thinking was somehow if it takes too much time in processing the previous IRP, I shouldn’t let it go in the routine again. That’s why I protect it from re-entering.

Why shouldn’t I do this?
<<

You didn’t protect it from re-entering- you could use a synchronization technique (such as acquiring and releasing a spinlock) for that. What you did was forego any of your usual processing of a request (leaving its completion completely unserviced) because your routine was busy with another customer.