[pulseaudio-discuss] Your Pulse Audio "Client sent non-aligned memblock" change

David Henningsson david.henningsson at canonical.com
Mon Nov 10 04:47:47 PST 2014


[adding pulseaudio-discuss to CC]

On 2014-11-10 13:34, Michael Schwendt wrote:
> Hello David!
>
> I've noticed a recently applied patch from you for Pulse Audio,
>
>    http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/21635
>
> which adds a warning that _somehow_ affects a user of Audacious:
>
>    Nov 10 01:09:37 deer pulseaudio[1780]: [pulseaudio] protocol-native.c:
>    Client sent non-aligned memblock: index 0, length 687, frame size: 8
>
> The Pulse Audio API documentation doesn't give a hint about what may
> be a problem here. Other users of Audacious are not affected. I don't
> know any details yet about whether the libpulseaudio based output driver
> is used or whether anything else may be the cause.
>
> I would be thankful for a hint. Is it that simple usage of pa_stream_write
> would need to be adjusted/fixed?

Hi Michael and thanks for your report,

In your call to pa_stream_write, you try to send 687 bytes, but with a 
frame size of 8 (could be e g 32-bit float, stereo), 687 bytes is 85.875 
frames, i e not an integer number of frames. We noticed that sending 
half a frame could cause PulseAudio to crash under some circumstances, 
so we decided to disallow it. From our perspective it only makes sense 
to push entire frames.

Note that this error should only happen with an older libpulse and newer 
pulseaudio daemon, as the newer libpulse client should block such 
attempts at the client side.

But we should probably release note such a change.


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list