[pulseaudio-discuss] [PATCH 0/4] Some bug fixes

Tanu Kaskinen tanuk at iki.fi
Fri Mar 22 12:19:35 PDT 2013


On Thu, 2013-03-14 at 22:07 +0200, Tanu Kaskinen wrote:
> I investigated a bug in module-loopback reported[1] by Frédéric
> Dalleau last year. The instructions for reproduction were as follows:
> 
>  1. Have one sound card (index 0) loaded with one sink (index 0) and
>     one source (index 1), plus the monitor source (index 0)
> 
>  2. pactl load-module module-loopback sink=0 source=0
> 
>  3. pactl set-card-profile 0 off
> 
> These steps caused reliable crashing, and after fixing the first
> issue, two more cropped up. The first three patches fix these three
> issues. When I investigated in more detail the exact conditions that
> caused the first crash, I found out that module-alsa-card was doing
> something that it shouldn't do: it was moving streams. The last patch
> fixes that.
> 
> Removing the stream moving from module-alsa-card causes a change in
> behavior that perhaps isn't acceptable: if a sink is removed due to
> a profile change and a new sink is created, the streams connected to
> the old sink aren't necessarily moved to the new sink. If this is
> unacceptable, the old policy should be reimplemented somewhere else,
> perhaps in module-rescue-streams.
> 
> [1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/13408
> 
> Tanu Kaskinen (4):
>   loopback: Fix segfault in may_move_to() callbacks
>   filter-apply: Fix segfault with moving streams
>   loopback: Flush asyncmsgq from the right context
>   alsa: Don't move streams when changing profiles
> 
>  src/modules/alsa/module-alsa-card.c |   19 ------------
>  src/modules/module-filter-apply.c   |   10 +++++--
>  src/modules/module-loopback.c       |   55 ++++++++++++++++++++++++-----------
>  3 files changed, 45 insertions(+), 39 deletions(-)

No feedback received, other than that the fourth patch should not go in
before the removed policy code is reimplemented elsewhere. I've pushed
the first three patches.

-- 
Tanu



More information about the pulseaudio-discuss mailing list