Reply to thread

Re: Help analyzing audio buzzes / DPC latency issue ?


Thank you writhziden for you reply.

I've started digging into the Stack and found that at the moment of a stutter, the function ntoskrnl.exe!KxWaitForLockOwnerShip is called 66 times and runs for a total of 66 ms. The same thing happens concurrently on four different cores.

[ATTACH]26037[/ATTACH]


If we reverse the column order we can see which cores are occupied by that function. My CPU has 8 logical cores but 4 physical ones, so that may explain why the system stutters when only four cores are clogged. Another function, KxWaitForSpinLockAndAcquire is running on the four other cores.

[ATTACH]26039[/ATTACH]


I don't know what is a spinlock exactly, nor what it could be waiting for. Any ideas?


Here are the contents of the stacks leading up to the four 66 ms loops (most recent call at the bottom):

CPU#5:

[CODE]  ntoskrnl.exe!KiStartSystemThread

  ntoskrnl.exe!PspSystemThreadStartup

  ntoskrnl.exe!ExpWorkerThread

  ntoskrnl.exe!IopProcessWorkItem

  tunnel.sys!LwWorker

  tunnel.sys!TeredoWfpInjectionWorker

  fwpkclnt.sys!FwpsInjectTransportSendAsync0

  fwpkclnt.sys!FwppInjectTransportSendAsync

  fwpkclnt.sys!NetioExpandKernelStackAndCallout

  ntoskrnl.exe!KeExpandKernelStackAndCalloutInternal

  fwpkclnt.sys!FwppInjectionStackCallout

  tcpip.sys!IppInspectInjectTlSend

  tcpip.sys!IppSendDatagramsCommon

  tcpip.sys!IppJoinPath

  tcpip.sys!IppFindOrCreatePath

  ntoskrnl.exe!KeAcquireInStackQueuedSpinLockAtDpcLevel

  ntoskrnl.exe!KxWaitForLockOwnerShip

[/CODE]

CPU#4:

[CODE]  ntdll.dll!RtlUserThreadStart

  kernel32.dll!BaseThreadInitThunk

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  qbittorrent.exe!<PDB not found>

  ws2_32.dll!WSASendTo

  mswsock.dll!WSPSendTo

  ntdll.dll!ZwDeviceIoControlFile

  ntoskrnl.exe!KiSystemServiceCopyEnd

  ntoskrnl.exe!NtDeviceIoControlFile

  ntoskrnl.exe!IopXxxControlFile

  afd.sys!AfdFastIoDeviceControl

  afd.sys!AfdFastDatagramSend

  tcpip.sys!UdpTlProviderSendMessages

  ntoskrnl.exe!KeExpandKernelStackAndCalloutInternal

  tcpip.sys!UdpTlProviderSendMessagesCalloutRoutine

  tcpip.sys!UdpSendMessages

  tcpip.sys!IppJoinPath

  tcpip.sys!IppFindOrCreatePath

  ntoskrnl.exe!KeAcquireInStackQueuedSpinLockAtDpcLevel

  ntoskrnl.exe!KxWaitForLockOwnerShip

[/CODE]

CPU#0:

[CODE]  ntoskrnl.exe!KiStartSystemThread

  ntoskrnl.exe!PspSystemThreadStartup

  ndis.sys!ndisReceiveWorkerThread

  ndis.sys!ndisQueuedMiniportDpcWorkItem

  rt640x64.sys!<PDB not found>

  rt640x64.sys!<PDB not found>

  ndis.sys!NdisMIndicateReceiveNetBufferLists

  ndis.sys!ndisCallReceiveHandler

  ndis.sys!ndisMTopReceiveNetBufferLists

  ndis.sys!ndisMIndicateNetBufferListsToOpen

  tcpip.sys!FlReceiveNetBufferListChain

  ntoskrnl.exe!KeExpandKernelStackAndCalloutInternal

  tcpip.sys!FlReceiveNetBufferListChainCalloutRoutine

  tcpip.sys!IpFlcReceivePreValidatedPackets

  tcpip.sys!IppFlcReceivePacketsCore

  tcpip.sys!IppDispatchReceivePacketHelper

  ntoskrnl.exe!KeAcquireInStackQueuedSpinLockAtDpcLevel

  ntoskrnl.exe!KxWaitForLockOwnerShip

[/CODE]

CPU#2:

[CODE]  ntoskrnl.exe!KiStartSystemThread

  ntoskrnl.exe!PspSystemThreadStartup

  ndis.sys!ndisReceiveWorkerThread

  ndis.sys!ndisQueuedMiniportDpcWorkItem

  rt640x64.sys!<PDB not found>

  rt640x64.sys!<PDB not found>

  rt640x64.sys!<PDB not found>

  rt640x64.sys!<PDB not found>

  ndis.sys!NdisMIndicateReceiveNetBufferLists

  ndis.sys!ndisCallReceiveHandler

  ndis.sys!ndisMTopReceiveNetBufferLists

  ndis.sys!ndisMIndicateNetBufferListsToOpen

  tcpip.sys!FlReceiveNetBufferListChain

  ntoskrnl.exe!KeExpandKernelStackAndCalloutInternal

  tcpip.sys!FlReceiveNetBufferListChainCalloutRoutine

  tcpip.sys!FlpReceiveNonPreValidatedNetBufferListChain

  tcpip.sys!IppFlcReceivePacketsCore

  tcpip.sys!IppDispatchReceivePacketHelper

  ntoskrnl.exe!KeAcquireInStackQueuedSpinLockAtDpcLevel

  ntoskrnl.exe!KxWaitForLockOwnerShip

[/CODE]

I have captured a second trace in which only three cores seem to be occupied by ntoskrnl.exe!KxWaitForLockOwnerShip. I'm still looking into it.


Back
Top