CPU core pegged, via DCOMLauncher/audiodg.exe on multiple vendors' hardware, under Vista.

Were seeing several Vista machines, with widely varying sound hardware (onboard such as Sigmatel, Realtek, plus add-in like SB X-fi, Audigy etc) that are all exhibiting some odd behavior with our application -- a pegged CPU core. All have the latest driver updates from the OEMs, for whatever that's worth.

The problem is that when our process engages audio capture, a svchost process which spawns DCOMLauncher pegs a CPU core at close to 100%. If we kill audiodg.exe, this process goes back down to zero. (and obviously, audio capture stops :-). We did a little bit of chain-saw exploratory surgery, and it looked like something related to PnP was trying to fetch an OEM[xx].inf entry. Over and over again.

Essentially our application performs audio capture, and we have several different modes of capture that we can engage: legacy mmsystem, DirectShow, and WDM capture. All of the above show this symptom under some Vista machines, fine under XP.

Other sound applications don't appear to show this issue on the machines in question.

It also doesn't appear to happen on all Vista machines.

We've also turned off generic audio enhancements and (where applicable) any/all audio-vendor-specific enhancement features.

One more tidbit of info -- it seems to be most severe when the audio capture device in question is a USB webcam, including Microsoft's own LifeCam series.

Anybody have any ideas on the best way to trace this issue?

-WG

[1494 byte] By [WillGaddy] at [2008-3-6]
# 1

For posterity:

Problem solved -- this problem was due to a code flow that repeatedly queried the wave device for its device capabilities, and the mixer device for its capabilitites during the course of capture. Under XP, this is relatively costless. Under Vista, with some vendors' drivers, it is Very costly, apparently.

Ultimately, the way we traced through to the problem was that we used Resource Monitor to identify the offending process (Svchost [DCOMLauncher]), then identified the threads that were pounding the CPU. We then suspended them.

Immediately, our application froze -- after breaking it, it gave us a good stack trace that showed the offending API call in the audio capture thread -- in this case, waveInGetDevCaps.

This seems intimately tied to the new security model with Vista -- the DComLauncher was trying to perform some UPnP lookup at the behest of the mmsystem emulation layer, which in turn was querying the device entry in the registry, which in turn was generating a security error, which resulted in it retrying. Again. And Again.

I'm not sure it's a great idea that waveInGetDevCaps causes such thrashing, but when you're entirely refactoring your O/S's audio architecture, I suppose you have to break a couple eggs to make the omelet.

Cheers.

WillGaddy at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...
# 2

I'd love to see the call stacks - the MME APIs have nothing to do with UPnP, or with DComLauncher.

waveInGetDevCaps runs entirely inside the client process, it shouldn't touch audiodg (unless you issue it on a wave handle, in which case the waveOutOpen call will create a stream).

LarryOsterman at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...
# 3

I had exactly the same problem when I was trying to open the recording tab on sound devices the windows was not responding and after some time the dcomlauncher was crashed.

I stoped the windows audio service then I disabled the line in recording device(AC'97) and then I restarted the audio service, then the windows was fully functional....without line in Smile

Ai8erovamon at 2007-9-5 > top of Msdn Tech,Software Development for Windows Vista,Vista Pro-Audio Application Development...

Software Development for Windows Vista

Site Classified