Bug#653320: pulseaudio: Assertion 'length % bq->base == 0' failed, kills daemon
David Fries
david at fries.net
Thu Apr 17 05:27:36 UTC 2014
On Sat, Apr 12, 2014 at 09:02:34PM -0300, Felipe Sateler wrote:
> Hi David,
>
> On Mon, Dec 26, 2011 at 04:01:21PM -0600, David Fries wrote:
> > Package: pulseaudio
> > Version: 0.9.21-3+squeeze1
> > Severity: normal
> >
> >
> > I found that pa_stream_write with an offset that's not a multiple of
> > the base sample size causes pulseaudio to assert and abort. This is
> > not the case for the nbytes parameter of how many bytes to write, that
> > is allowed to not be a multiple of the sample size, but the seek
> > offset parameter must be a multiple of the sample size or it asserts.
> >
> > E: memblockq.c: Assertion 'length % bq->base == 0' failed at
> > pulsecore/memblockq.c:519, function pa_memblockq_drop(). Aborting.
> > Aborted
> >
> > pulseaudio 1.0-4 gives the following,
> > E: [alsa-sink] memblockq.c: Assertion 'length % bq->base == 0' failed
> > at pulsecore/memblockq.c:600, function pa_memblockq_drop(). Aborting.
> >
> > I've fixed the program causing it, I just wanted to make others aware
> > that any program that can play audio can take down the audio daemon.
>
> You reported this issue a long time ago, and the problem might have been
> fixed since then.
>
> Can you still reproduce this problem? If so, please reply (preferably
> with a short offending program) so we may debug this. Otherwise I'd like
> to close this bug.
>
> Thanks
>
>
> --
> Saludos,
> Felipe Sateler
Thanks for asking about this bug, I modified a test (attached) to
demonstrate it is still a problem. There might be a shorter setup
sequence, but it comes down to giving SEEK as something other than a
multiple of the sample size.
pa_stream_write(p, buffer, nbytes, NULL, SEEK, PA_SEEK_RELATIVE);
pulseaudio 2.0-6.1
cc -g -Wall -g PulseSeekBug.c -lpulse -o PulseSeekBug && ./PulseSeekBug
wrote 65472, offset 1
Stream state 3, suspended -15, corked -15, writable size -1
Stream state 3, suspended -15, corked -15, writable size -1
Stream state 3, suspended -15, corked -15, writable size -1
Stream state 3, suspended -15, corked -15, writable size -1
/usr/bin/pulseaudio
W: [pulseaudio] pid.c: Stale PID file, overwriting.
E: [alsa-sink] memblockq.c: Assertion 'length % bq->base == 0' failed at pulsecore/memblockq.c:613, function pa_memblockq_drop(). Aborting.
Aborted
--
David Fries <david at fries.net> PGP pub CB1EE8F0
http://fries.net/~david/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PulseSeekBug.c
Type: text/x-csrc
Size: 3308 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-pulseaudio-devel/attachments/20140417/0200e05a/attachment.c>
More information about the pkg-pulseaudio-devel
mailing list