[Win10 x64] Help analyzing audio buzzes / DPC latency issue ?

Cutter

Member
Joined
Apr 17, 2017
Posts
5
Hi

I have frequent micro-stutters where the video freezes and the music "buzzes" for a few milliseconds. I've found a video of the same problem here. In my case it happens when my Internet connection is heavily used in the background. I'm on Windows 10 64-bit using an onboard Realtek ALC889 sound chip and an onboard Realtek network ethernet controller. My audio and ethernet drivers, as well as my BIOS, are up to date. I've run memtest for 24 hours without any detected problem.

I've captured one of those stutters in a trace. Here's a screenshot of the DPC/ISR events. Around the center there's a ~65ms time frame where the amount of DPC/ISR events drops and ndis.sys tcpip.sys and ntoskrnl.exe go completely silent. I don't know how to diagnose this problem. I can send the trace to anyone who asks (I'm just not comfortable letting it accessible out in the open on a public forum).

Thanks to anyone willing to help me.

wpa_2017-05-06_16-12-43.jpg
 
Re: Help analyzing audio buzzes / DPC latency issue ?

Follow cluberti's steps here to diagnose the likely causes of the latency issues (click on the link that the word "here" creates). If you need further help, please provide your XPERF trace by attaching your trace.etl file.
 
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.
wpa_2017-05-11_14-58-24.png

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.
wpa_2017-05-11_15-29-42.png

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
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
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
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
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.
 
Re: Help analyzing audio buzzes / DPC latency issue ?

The problem appears to be due to qBittorrent and your Realtek Ethernet drivers. You said that the problem occurs when your internet is under heavy use. Is it only when it is under heavy use through qBittorrent, or does it happen with other network activity? Are you using the Realtek Ethernet/LAN drivers from your system manufacturer? Is the set of drivers up to date from that manufacturer? - You said your drivers are up to date, but you did not mention where you obtained the drivers from, e.g. did you obtain the drivers from Realtek or from your system manufacturer?

Also, you may want to keep in mind that torrent data is rarely a secure method to receive files. The data is often from unknown sources that may or may not introduce security vulnerabilities into the system downloading the torrent data. It is possible that one such vulnerability has already been introduced into your system and is manifesting itself as a latency issue.
 
Last edited:
Re: Help analyzing audio buzzes / DPC latency issue ?

Thanks. My current drivers are from Realtek's website. I will try installing those provided by my motherboard manufacturer, even thouh the latest ones are compatible with Windows 7. It is possible that they were updated by Windows when I upgraded to Windows 10 from Windows 7, which corresponds to the moment I started experiencing those glitches.
I don't have a way to test as heavy Ethernet usage as the one generated by BitTorrent.
I've run a MalwareBytes tool a few weeks ago and it didn't detect anything unusual. My antivirus is up to date.
 
Re: Help analyzing audio buzzes / DPC latency issue ?

I've installed those network drivers provided by my motherboard manufacturer and I still experience audio glitches.
To check if this is caused by qBittorrent or not, I'd need to generate heavy sustained network traffic another way. Is there a tool that simulates network traffic and puts the network drivers under stress ?

Thanks.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top