[pulseaudio-discuss] Best Case Latency

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Thu Oct 3 05:51:54 PDT 2013


On Thu, 2013-10-03 at 18:20 +1000, Patrick Shirkey wrote:
> On Thu, October 3, 2013 5:14 pm, Tanu Kaskinen wrote:
> > On Thu, 2013-10-03 at 02:33 +1000, Patrick Shirkey wrote:
> >> I see the following sprinkled in /var/log/messages
> >>
> >> Sep 30 12:19:02 xxx pulseaudio[28845]: [pulseaudio] ratelimit.c: 1997
> >> events suppressed
> >> Sep 30 12:19:02 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >>
> >> <snip>
> >>
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [jack-source] ratelimit.c: 41
> >> events suppressed
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Sep 30 21:40:04 xxx pulseaudio[28845]: [jack-source] asyncq.c: q
> >> overrun,
> >> queuing locally
> >>
> >> <snip>
> >>
> >> Oct  1 09:53:30 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] ratelimit.c: 2291
> >> events suppressed
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:20 xxx pulseaudio[28845]: [pulseaudio] asyncq.c: q overrun,
> >> queuing locally
> >> Oct  1 10:01:42 xxx pulseaudio[28845]: [pulseaudio] ratelimit.c: 2321
> >> events suppressed
> >
> > That doesn't look healthy. The message is printed when
> > pa_asyncmsgq_post() is called and the message queue is full. The message
> > queue can store 256 messages before this starts to happen, so some queue
> > consumer is having serious trouble keeping up with the producer. It
> > would be nice to know which pa_asyncmsgq_post() call this is (you could
> > set a breakpoint on the line that prints "q overrun", and then get a
> > backtrace).
> >
> 
> Sorry, if this is dense but how do I set a breakpoint on this line in PA
> while it is running?

Have you used gdb before? You can either start pulseaudio in gdb, or
connect gdb to a running pulseaudio instance. The latter can be done
with command "gdb pulseaudio $PID_OF_RUNNING_PULSEAUDIO". See "man gdb".
Either approach requires debug symbols to be available. If building from
source is not a problem, then I recommend building and installing[1] the
latest pulseaudio from git, which is the distro independent way of
getting the debug symbols.

Once you're in the gdb prompt, run this command (the line number refers
to the current code in the master branch, adjust the line number as
necessary if you use some other version):

    break async.c:211

If you connected to a running pulseaudio, continue the execution with
this command:

    continue

If you started pulseaudio in gdb, start the execution with this command:

    run

[1] http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/PulseAudioFromGit/

-- 
Tanu



More information about the pulseaudio-discuss mailing list