Bug 55139

Summary: [combine] memblockq.c: Assertion '!bq->blocks || (bq->write_index + (int64_t)chunk.length <= bq->blocks->index)' failed at pulsecore/memblockq.c:408, function pa_memblockq_push(). Aborting.
Product: PulseAudio Reporter: Tvrtko Ursulin <tvrtko.ursulin>
Component: modulesAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tvrtko Ursulin 2012-09-20 10:53:04 UTC
PulseAudio 1.1, this happens regularly when playing back DVB-T through GStreamer pulsesink and Flash over ALSA to PA bridge.


(gdb) thread apply all bt

Thread 6 (Thread 0x7faf5ffde780 (LWP 32742)):
#0  0x00007faf5f3a62f7 in map_flags_to_libc (flags=PA_IO_EVENT_INPUT) at pulse/mainloop.c:135
#1  rebuild_pollfds (m=0x16cab60) at pulse/mainloop.c:650
#2  pa_mainloop_prepare (m=0x16cab60, timeout=-1) at pulse/mainloop.c:829
#3  0x00007faf5f3a6b9d in pa_mainloop_iterate (m=0x16cab60, block=<optimized out>, retval=0x7ffff41f9fd4) at pulse/mainloop.c:954
#4  0x00007faf5f3a6c60 in pa_mainloop_run (m=0x16cab60, retval=0x7ffff41f9fd4) at pulse/mainloop.c:975
#5  0x0000000000406a08 in main (argc=<optimized out>, argv=<optimized out>) at daemon/main.c:1132

Thread 5 (Thread 0x7faf4f4ae700 (LWP 32748)):
#0  0x00007faf5d2b5b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007faf5ef55568 in pa_semaphore_wait (s=0x7faf44000ab0) at pulsecore/semaphore-posix.c:63
#2  0x00007faf5fb606da in pa_asyncmsgq_send (a=0x17082d0, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007faf4daa8046 in request_memblock (length=28180, o=0x1708310) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=28180, chunk=0x7faf4f4ab4d0) at modules/module-combine-sink.c:421
#5  0x00007faf5fb87edb in pa_sink_input_peek (i=0x1719230, slength=28180, chunk=0x7faf4f4ab610, volume=0x7faf4f4ab628) at pulsecore/sink-input.c:812
#6  0x00007faf5fb8e46a in fill_mix_info (s=0x16f3f80, length=0x7faf4f4adcb8, info=0x7faf4f4ab610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007faf5fb90e27 in pa_sink_render_into (s=0x16f3f80, target=0x7faf4f4add10) at pulsecore/sink.c:1189
#8  0x00007faf5fb91379 in pa_sink_render_into_full (s=0x16f3f80, target=0x7faf4f4adda0) at pulsecore/sink.c:1273
#9  0x00007faf501d3b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x16eb520) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x16eb520) at modules/alsa/alsa-sink.c:1656
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x16da240) at pulsecore/thread-posix.c:83
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7faf4e4ac700 (LWP 32753)):
#0  0x00007faf5d2b5b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007faf5ef55568 in pa_semaphore_wait (s=0x7faf38000b10) at pulsecore/semaphore-posix.c:63
#2  0x00007faf5fb606da in pa_asyncmsgq_send (a=0x1709f30, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007faf4daa8046 in request_memblock (length=26000, o=0x170eaa0) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=26000, chunk=0x7faf4e4a94d0) at modules/module-combine-sink.c:421
#5  0x00007faf5fb87edb in pa_sink_input_peek (i=0x1721fb0, slength=26000, chunk=0x7faf4e4a9610, volume=0x7faf4e4a9628) at pulsecore/sink-input.c:812
#6  0x00007faf5fb8e46a in fill_mix_info (s=0x1701700, length=0x7faf4e4abcb8, info=0x7faf4e4a9610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007faf5fb90e27 in pa_sink_render_into (s=0x1701700, target=0x7faf4e4abd10) at pulsecore/sink.c:1189
#8  0x00007faf5fb91379 in pa_sink_render_into_full (s=0x1701700, target=0x7faf4e4abda0) at pulsecore/sink.c:1273
#9  0x00007faf501d3b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x16fa320) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x16fa320) at modules/alsa/alsa-sink.c:1656
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x16fa980) at pulsecore/thread-posix.c:83
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7faf4fcaf700 (LWP 32747)):
#0  0x00007faf5d2b5b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007faf5ef55568 in pa_semaphore_wait (s=0x1734150) at pulsecore/semaphore-posix.c:63
#2  0x00007faf5fb606da in pa_asyncmsgq_send (a=0x1700a10, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007faf4daa8046 in request_memblock (length=27636, o=0x1708130) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=27636, chunk=0x7faf4fcac4d0) at modules/module-combine-sink.c:421
#5  0x00007faf5fb87edb in pa_sink_input_peek (i=0x17120c0, slength=27636, chunk=0x7faf4fcac610, volume=0x7faf4fcac628) at pulsecore/sink-input.c:812
#6  0x00007faf5fb8e46a in fill_mix_info (s=0x16ec9b0, length=0x7faf4fcaecb8, info=0x7faf4fcac610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007faf5fb90e27 in pa_sink_render_into (s=0x16ec9b0, target=0x7faf4fcaed10) at pulsecore/sink.c:1189
#8  0x00007faf5fb91379 in pa_sink_render_into_full (s=0x16ec9b0, target=0x7faf4fcaeda0) at pulsecore/sink.c:1273
#9  0x00007faf501d3b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x16d7b60) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x16d7b60) at modules/alsa/alsa-sink.c:1656
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x16ebcf0) at pulsecore/thread-posix.c:83
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7faf4ecad700 (LWP 32751)):
#0  0x00007faf5d2b5b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007faf5ef55568 in pa_semaphore_wait (s=0x16da760) at pulsecore/semaphore-posix.c:63
#2  0x00007faf5fb606da in pa_asyncmsgq_send (a=0x1709c00, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007faf4daa8046 in request_memblock (length=27924, o=0x1709d10) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=27924, chunk=0x7faf4ecaa4d0) at modules/module-combine-sink.c:421
#5  0x00007faf5fb87edb in pa_sink_input_peek (i=0x171d8f0, slength=27924, chunk=0x7faf4ecaa610, volume=0x7faf4ecaa628) at pulsecore/sink-input.c:812
#6  0x00007faf5fb8e46a in fill_mix_info (s=0x16fab80, length=0x7faf4ecaccb8, info=0x7faf4ecaa610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007faf5fb90e27 in pa_sink_render_into (s=0x16fab80, target=0x7faf4ecacd10) at pulsecore/sink.c:1189
#8  0x00007faf5fb91379 in pa_sink_render_into_full (s=0x16fab80, target=0x7faf4ecacda0) at pulsecore/sink.c:1273
#9  0x00007faf501d3b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x16f3880) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x16f3880) at modules/alsa/alsa-sink.c:1656
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x16fa6f0) at pulsecore/thread-posix.c:83
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7faf4daa1700 (LWP 32754)):
#0  0x00007faf5c896285 in raise () from /lib64/libc.so.6
#1  0x00007faf5c897b9b in abort () from /lib64/libc.so.6
#2  0x00007faf5ef3f20d in pa_memblockq_push (bq=0x1709df0, uchunk=<optimized out>) at pulsecore/memblockq.c:278
#3  0x00007faf5ef401f2 in pa_memblockq_push_align (bq=0x1709df0, chunk=<optimized out>) at pulsecore/memblockq.c:786
#4  0x00007faf4daa5650 in sink_input_process_msg (obj=0x171d8f0, code=7, data=0x0, offset=0, chunk=0x7faf4daa0bc0) at modules/module-combine-sink.c:574
#5  0x00007faf5fb60f51 in pa_asyncmsgq_process_one (a=0x1708270) at pulsecore/asyncmsgq.c:276
#6  0x00007faf4daa5f89 in render_memblock (length=27924, o=0x1709d10, u=0x16d71a0) at modules/module-combine-sink.c:365
#7  sink_process_msg (o=0x1708560, code=28, data=0x1709d10, offset=27924, chunk=0x0) at modules/module-combine-sink.c:779
#8  0x00007faf5fb7cdb2 in asyncmsgq_read_work (i=0x7faf3c000a40) at pulsecore/rtpoll.c:566
#9  0x00007faf5fb7c2bf in pa_rtpoll_run (p=0x16f3410, wait_op=true) at pulsecore/rtpoll.c:238
#10 0x00007faf4daa67ae in thread_func (userdata=0x16d71a0) at modules/module-combine-sink.c:331
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x170ff50) at pulsecore/thread-posix.c:83
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6



Thread 1 (Thread 0x7faf4daa1700 (LWP 32754)):
#0  0x00007faf5c896285 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007faf5c897b9b in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007faf5ef3f20d in pa_memblockq_push (bq=0x1709df0, uchunk=<optimized out>) at pulsecore/memblockq.c:278
        q = <optimized out>
        n = <optimized out>
        chunk = <optimized out>
        old = <optimized out>
        __func__ = "pa_memblockq_push"
        __PRETTY_FUNCTION__ = "pa_memblockq_push"
#3  0x00007faf5ef401f2 in pa_memblockq_push_align (bq=0x1709df0, chunk=<optimized out>) at pulsecore/memblockq.c:786
        r = <optimized out>
        rchunk = {memblock = 0x7faf3c07c650, index = 0, length = 1476}
        __func__ = "pa_memblockq_push_align"
        __PRETTY_FUNCTION__ = "pa_memblockq_push_align"
#4  0x00007faf4daa5650 in sink_input_process_msg (obj=0x171d8f0, code=7, data=0x0, offset=0, chunk=0x7faf4daa0bc0) at modules/module-combine-sink.c:574
        o = <optimized out>
#5  0x00007faf5fb60f51 in pa_asyncmsgq_process_one (a=0x1708270) at pulsecore/asyncmsgq.c:276
        object = 0x171d8f0
        code = 7
        data = 0x0
        chunk = {memblock = 0x7faf3c07c650, index = 0, length = 1476}
        offset = 0
        ret = <optimized out>
        __func__ = "pa_asyncmsgq_process_one"
        __PRETTY_FUNCTION__ = "pa_asyncmsgq_process_one"
#6  0x00007faf4daa5f89 in render_memblock (length=27924, o=0x1709d10, u=0x16d71a0) at modules/module-combine-sink.c:365
No locals.
#7  sink_process_msg (o=0x1708560, code=28, data=0x1709d10, offset=27924, chunk=0x0) at modules/module-combine-sink.c:779
        u = 0x16d71a0
#8  0x00007faf5fb7cdb2 in asyncmsgq_read_work (i=0x7faf3c000a40) at pulsecore/rtpoll.c:566
        ret = <optimized out>
        object = 0x1708560
        code = 28
        data = 0x1709d10
        chunk = {memblock = 0x0, index = 0, length = 0}
        offset = 27924
        __func__ = "asyncmsgq_read_work"
        __PRETTY_FUNCTION__ = "asyncmsgq_read_work"
#9  0x00007faf5fb7c2bf in pa_rtpoll_run (p=0x16f3410, wait_op=true) at pulsecore/rtpoll.c:238
        k = <optimized out>
        i = 0x7faf3c000a40
        r = 0
        timeout = {tv_sec = 0, tv_usec = 0}
        __func__ = "pa_rtpoll_run"
        __PRETTY_FUNCTION__ = "pa_rtpoll_run"
#10 0x00007faf4daa67ae in thread_func (userdata=0x16d71a0) at modules/module-combine-sink.c:331
        ret = <optimized out>
        u = 0x16d71a0
        __func__ = "thread_func"
        __PRETTY_FUNCTION__ = "thread_func"
#11 0x00007faf5ef55308 in internal_thread_func (userdata=0x170ff50) at pulsecore/thread-posix.c:83
        t = 0x170ff50
#12 0x00007faf5d2afd90 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#13 0x00007faf5c950f5d in clone () from /lib64/libc.so.6
No symbol table info available.
Comment 1 Tvrtko Ursulin 2012-09-21 14:48:57 UTC
I am not hitting this under 2.1 so I can only presume the problem has been fixed.
Comment 2 Tanu Kaskinen 2012-09-21 16:07:27 UTC
Thanks, resolving as fixed then.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.