Bug 55140

Summary: [alsa-sink] memblockq.c: Assertion 'bq->blocks_tail == q' failed at pulsecore/memblockq.c:194, function drop_block(). 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:56:59 UTC
PulseAudio 1.1, this happens regularly when playing back DVB-T through
GStreamer pulsesink and Flash over ALSA to PA bridge.


Thread 6 (Thread 0x7f763aeaf780 (LWP 1575)):
#0  0x00007f7637819693 in ppoll () from /lib64/libc.so.6
#1  0x00007f763a2775d7 in pa_mainloop_poll (m=0x24f8e50) at pulse/mainloop.c:883
#2  0x00007f763a277ba9 in pa_mainloop_iterate (m=0x24f8e50, block=<optimized out>, retval=0x7fff18abe574) at pulse/mainloop.c:957
#3  0x00007f763a277c60 in pa_mainloop_run (m=0x24f8e50, retval=0x7fff18abe574) at pulse/mainloop.c:975
#4  0x0000000000406a08 in main (argc=<optimized out>, argv=<optimized out>) at daemon/main.c:1132

Thread 5 (Thread 0x7f762a37f700 (LWP 1595)):
#0  0x00007f7638186b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007f7639e26568 in pa_semaphore_wait (s=0x255bbe0) at pulsecore/semaphore-posix.c:63
#2  0x00007f763aa316da in pa_asyncmsgq_send (a=0x2534d90, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007f7628979046 in request_memblock (length=21112, o=0x2520950) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=21112, chunk=0x7f762a37c4d0) at modules/module-combine-sink.c:421
#5  0x00007f763aa58edb in pa_sink_input_peek (i=0x2545cb0, slength=21112, chunk=0x7f762a37c610, volume=0x7f762a37c628) at pulsecore/sink-input.c:812
#6  0x00007f763aa5f46a in fill_mix_info (s=0x2520a20, length=0x7f762a37ecb8, info=0x7f762a37c610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007f763aa61e27 in pa_sink_render_into (s=0x2520a20, target=0x7f762a37ed10) at pulsecore/sink.c:1189
#8  0x00007f763aa62379 in pa_sink_render_into_full (s=0x2520a20, target=0x7f762a37eda0) at pulsecore/sink.c:1273
#9  0x00007f762b0a4b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x2517fc0) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x2517fc0) at modules/alsa/alsa-sink.c:1656
#11 0x00007f7639e26308 in internal_thread_func (userdata=0x2506ce0) at pulsecore/thread-posix.c:83
#12 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f7637821f5d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f762ab80700 (LWP 1591)):
#0  0x00007f7638186b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007f7639e26568 in pa_semaphore_wait (s=0x7f761c000a90) at pulsecore/semaphore-posix.c:63
#2  0x00007f763aa316da in pa_asyncmsgq_send (a=0x25370e0, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007f7628979046 in request_memblock (length=21272, o=0x2534ad0) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=21272, chunk=0x7f762ab7d4d0) at modules/module-combine-sink.c:421
#5  0x00007f763aa58edb in pa_sink_input_peek (i=0x253eb30, slength=21272, chunk=0x7f762ab7d610, volume=0x7f762ab7d628) at pulsecore/sink-input.c:812
#6  0x00007f763aa5f46a in fill_mix_info (s=0x2519450, length=0x7f762ab7fcb8, info=0x7f762ab7d610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007f763aa61e27 in pa_sink_render_into (s=0x2519450, target=0x7f762ab7fd10) at pulsecore/sink.c:1189
#8  0x00007f763aa62379 in pa_sink_render_into_full (s=0x2519450, target=0x7f762ab7fda0) at pulsecore/sink.c:1273
#9  0x00007f762b0a4b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x25045d0) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x25045d0) at modules/alsa/alsa-sink.c:1656
#11 0x00007f7639e26308 in internal_thread_func (userdata=0x2518790) at pulsecore/thread-posix.c:83
#12 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0

#13 0x00007f7637821f5d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f7628972700 (LWP 1600)):
#0  pa_memblockq_push (bq=0x2536580, uchunk=<optimized out>) at pulsecore/memblockq.c:328
#1  0x00007f7639e111f2 in pa_memblockq_push_align (bq=0x2536580, chunk=<optimized out>) at pulsecore/memblockq.c:786
#2  0x00007f7628976650 in sink_input_process_msg (obj=0x2545cb0, code=7, data=0x0, offset=0, chunk=0x7f7628971bc0) at modules/module-combine-sink.c:574
#3  0x00007f763aa31f51 in pa_asyncmsgq_process_one (a=0x25375a0) at pulsecore/asyncmsgq.c:276
#4  0x00007f7628976f89 in render_memblock (length=21112, o=0x2520950, u=0x252a250) at modules/module-combine-sink.c:365
#5  sink_process_msg (o=0x2534f00, code=28, data=0x2520950, offset=21112, chunk=0x0) at modules/module-combine-sink.c:779
#6  0x00007f763aa4ddb2 in asyncmsgq_read_work (i=0x7f7618000980) at pulsecore/rtpoll.c:566
#7  0x00007f763aa4d2bf in pa_rtpoll_run (p=0x25074d0, wait_op=true) at pulsecore/rtpoll.c:238
#8  0x00007f76289777ae in thread_func (userdata=0x252a250) at modules/module-combine-sink.c:331
#9  0x00007f7639e26308 in internal_thread_func (userdata=0x253c9c0) at pulsecore/thread-posix.c:83
#10 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f7637821f5d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f762937d700 (LWP 1599)):
#0  0x00007f7638186b70 in sem_wait () from /lib64/libpthread.so.0
#1  0x00007f7639e26568 in pa_semaphore_wait (s=0x2507200) at pulsecore/semaphore-posix.c:63
#2  0x00007f763aa316da in pa_asyncmsgq_send (a=0x25369f0, object=<optimized out>, code=<optimized out>, userdata=<optimized out>, offset=<optimized out>, chunk=<optimized out>) at pulsecore/asyncmsgq.c:167
#3  0x00007f7628979046 in request_memblock (length=21144, o=0x253b540) at modules/module-combine-sink.c:410
#4  sink_input_pop_cb (i=<optimized out>, nbytes=21144, chunk=0x7f762937a4d0) at modules/module-combine-sink.c:421
#5  0x00007f763aa58edb in pa_sink_input_peek (i=0x254ea30, slength=21144, chunk=0x7f762937a610, volume=0x7f762937a628) at pulsecore/sink-input.c:812
#6  0x00007f763aa5f46a in fill_mix_info (s=0x252e1b0, length=0x7f762937ccb8, info=0x7f762937a610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007f763aa61e27 in pa_sink_render_into (s=0x252e1b0, target=0x7f762937cd10) at pulsecore/sink.c:1189
#8  0x00007f763aa62379 in pa_sink_render_into_full (s=0x252e1b0, target=0x7f762937cda0) at pulsecore/sink.c:1273
#9  0x00007f762b0a4b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x2526de0) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x2526de0) at modules/alsa/alsa-sink.c:1656
#11 0x00007f7639e26308 in internal_thread_func (userdata=0x2507080) at pulsecore/thread-posix.c:83
#12 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f7637821f5d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f7629b7e700 (LWP 1597)):
#0  0x00007f7637767285 in raise () from /lib64/libc.so.6
#1  0x00007f7637768b9b in abort () from /lib64/libc.so.6
#2  0x00007f7639e0fabb in drop_block (bq=0x254c250, q=0x7f761800fbd0) at pulsecore/memblockq.c:180
#3  0x00007f7639e10014 in pa_memblockq_push (bq=0x254c250, uchunk=<optimized out>) at pulsecore/memblockq.c:328
#4  0x00007f7639e111f2 in pa_memblockq_push_align (bq=0x254c250, chunk=<optimized out>) at pulsecore/memblockq.c:786
#5  0x00007f763aa58f7d in pa_sink_input_peek (i=0x254a390, slength=21556, chunk=0x7f7629b7b610, volume=0x7f7629b7b628) at pulsecore/sink-input.c:886
#6  0x00007f763aa5f46a in fill_mix_info (s=0x2527d90, length=0x7f7629b7dcb8, info=0x7f7629b7b610, maxinfo=32) at pulsecore/sink.c:950
#7  0x00007f763aa61e27 in pa_sink_render_into (s=0x2527d90, target=0x7f7629b7dd10) at pulsecore/sink.c:1189
#8  0x00007f763aa62379 in pa_sink_render_into_full (s=0x2527d90, target=0x7f7629b7dda0) at pulsecore/sink.c:1273
#9  0x00007f762b0a4b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x2520320) at modules/alsa/alsa-sink.c:632
#10 thread_func (userdata=0x2520320) at modules/alsa/alsa-sink.c:1656
#11 0x00007f7639e26308 in internal_thread_func (userdata=0x25269b0) at pulsecore/thread-posix.c:83
#12 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0
#13 0x00007f7637821f5d in clone () from /lib64/libc.so.6



Thread 1 (Thread 0x7f7629b7e700 (LWP 1597)):
#0  0x00007f7637767285 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f7637768b9b in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007f7639e0fabb in drop_block (bq=0x254c250, q=0x7f761800fbd0) at pulsecore/memblockq.c:180
        __func__ = "drop_block"
        __PRETTY_FUNCTION__ = "drop_block"
#3  0x00007f7639e10014 in pa_memblockq_push (bq=0x254c250, uchunk=<optimized out>) at pulsecore/memblockq.c:328
        p = 0x7f761800fbd0
        q = 0x7f7618011cf0
        n = <optimized out>
        chunk = {memblock = 0x7f76200068d0, index = 0, length = 444}
        old = 35585868
        __func__ = "pa_memblockq_push"
        __PRETTY_FUNCTION__ = "pa_memblockq_push"
#4  0x00007f7639e111f2 in pa_memblockq_push_align (bq=0x254c250, chunk=<optimized out>) at pulsecore/memblockq.c:786
        r = <optimized out>
        rchunk = {memblock = 0x7f76200068d0, index = 0, length = 444}
        __func__ = "pa_memblockq_push_align"
        __PRETTY_FUNCTION__ = "pa_memblockq_push_align"
#5  0x00007f763aa58f7d in pa_sink_input_peek (i=0x254a390, slength=21556, chunk=0x7f7629b7b610, volume=0x7f7629b7b628) at pulsecore/sink-input.c:886
        rchunk = {memblock = 0x7f76200068d0, index = 0, length = 444}
        wchunk = {memblock = 0x7f7618092740, index = 0, length = 444}
        nvfs = <optimized out>
        tchunk = {memblock = 0x7f7618092740, index = 0, length = 444}
        do_volume_adj_here = false
        need_volume_factor_sink = false
        volume_is_norm = true
        block_size_max_sink = 65472
        block_size_max_sink_input = 64960
        ilength = 21556
        __func__ = "pa_sink_input_peek"
        __PRETTY_FUNCTION__ = "pa_sink_input_peek"
#6  0x00007f763aa5f46a in fill_mix_info (s=0x2527d90, length=0x7f7629b7dcb8, info=0x7f7629b7b610, maxinfo=32) at pulsecore/sink.c:950
        i = 0x254a390
        n = 0

        state = 0xffffffffffffffff
        mixlength = 21556
#7  0x00007f763aa61e27 in pa_sink_render_into (s=0x2527d90, target=0x7f7629b7dd10) at pulsecore/sink.c:1189
        info = {{chunk = {memblock = 0x0, index = 0, length = 0}, volume = {channels = 2 '\002', values = {65536, 65536, 0 <repeats 30 times>}}, userdata = 0x0, ptr = 0x0, linear = {{i = 0, f = 0} <repeats 32 times>}}, {chunk = {
              memblock = 0x0, index = 0, length = 0}, volume = {channels = 0 '\000', values = {0 <repeats 32 times>}}, userdata = 0x0, ptr = 0x0, linear = {{i = 0, f = 0} <repeats 32 times>}} <repeats 28 times>, {chunk = {
              memblock = 0x0, index = 0, length = 0}, volume = {channels = 0 '\000', values = {0 <repeats 17 times>, 39038112, 0, 983769745, 32630, 0, 0, 719254844, 32630, 699914544, 32630, 722015846, 32630, 0, 0, 39038112}}, 
            userdata = 0x7f7624001bb0, ptr = 0x1e, linear = {{i = 1, f = 1.40129846e-45}, {i = 0, f = 0}, {i = 941128496, f = 3.63543513e-05}, {i = 32630, f = 4.57243689e-41}, {i = 16384, f = 2.2958874e-41}, {i = 1142960697, 
                f = 640.784729}, {i = 8, f = 1.12103877e-44}, {i = 0, f = 0}, {i = 699914688, f = 8.16460614e-14}, {i = 32630, f = 4.57243689e-41}, {i = 941127129, f = 3.63493782e-05}, {i = 32630, f = 4.57243689e-41}, {i = 0, 
                f = 0}, {i = 0, f = 0}, {i = 970975181, f = 0.000427065796}, {i = 32630, f = 4.57243689e-41}, {i = 39020320, f = 1.55314272e-37}, {i = 0, f = 0}, {i = 603986864, f = 2.77790278e-17}, {i = 32630, 
                f = 4.57243689e-41}, {i = 39038192, f = 1.55514624e-37}, {i = 0, f = 0}, {i = 0, f = 0}, {i = 0, f = 0}, {i = 0, f = 0}, {i = 0, f = 0}, {i = 983836229, f = 0.00125236122}, {i = 32630, f = 4.57243689e-41}, {
                i = 0, f = 0}, {i = 0, f = 0}, {i = 0, f = 0}, {i = 0, f = 0}}}, {chunk = {memblock = 0x0, index = 6202034166383071488, length = 1}, volume = {channels = 144 '\220', values = {2013265920, 39038112, 0, 983769745, 
                32630, 0, 0, 983770570, 32630, 0, 0, 975739610, 32630, 603986672, 32630, 930812846, 32630, 603986864, 32630, 48, 0, 0, 0, 352256, 0, 356352, 0, 0, 0, 1, 0, 0}}, userdata = 0x60, ptr = 0x0, linear = {{i = 0, 
                f = 0}, {i = 0, f = 0}, {i = 4, f = 5.60519386e-45}, {i = 49, f = 6.86636248e-44}, {i = 91, f = 1.2751816e-43}, {i = 110, f = 1.54142831e-43}, {i = 119, f = 1.66754517e-43}, {i = 124, f = 1.7376101e-43}, {
                i = 984076604, f = 0.00128034456}, {i = 32630, f = 4.57243689e-41}, {i = 536870944, f = 1.08420631e-19}, {i = 32630, f = 4.57243689e-41}, {i = 48, f = 6.72623263e-44}, {i = 0, f = 0}, {i = 6728128, 
                f = 9.42811543e-39}, {i = 0, f = 0}, {i = 4, f = 5.60519386e-45}, {i = 0, f = 0}, {i = 402743072, f = 1.67208851e-24}, {i = 32630, f = 4.57243689e-41}, {i = 699914976, f = 8.1648013e-14}, {i = 32630, 
                f = 4.57243689e-41}, {i = 415234212, f = 4.96234057e-24}, {i = 32767, f = 4.59163468e-41}, {i = 973358408, f = 0.00050457241}, {i = 32630, f = 4.57243689e-41}, {i = 971045808, f = 0.000429121312}, {i = 32630, 
                f = 4.57243689e-41}, {i = 35534756, f = 1.16239748e-37}, {i = 0, f = 0}, {i = 970999641, f = 0.000427777675}, {i = 32630, f = 4.57243689e-41}}}, {chunk = {memblock = 0x7f7629b7db30, index = 140145721823729, 
              length = 38960528}, volume = {channels = 80 'P', values = {32630, 699915256, 32630, 39020720, 0, 536879792, 32630, 971046821, 32630, 39020896, 0, 124, 0, 0, 0, 971029903, 32630, 402730208, 32630, 719254094, 32630, 
                73298, 0, 39020720, 0, 699915376, 32630, 0, 0, 39020720, 0, 39020720}}, userdata = 0x0, ptr = 0x7f7639e111e1, linear = {{i = 38960640, f = 1.54645236e-37}, {i = 0, f = 0}, {i = 699915376, f = 8.16507235e-14}, {
                i = 32630, f = 4.57243689e-41}, {i = 39036000, f = 1.55490051e-37}, {i = 0, f = 0}, {i = 983771186, f = 0.00124478922}, {i = 32630, f = 4.57243689e-41}, {i = 986355656, f = 0.00154566113}, {i = 32630, 
                f = 4.57243689e-41}, {i = 983765216, f = 0.00124409422}, {i = 32630, f = 4.57243689e-41}, {i = 39101328, f = 1.56222403e-37}, {i = 0, f = 0}, {i = 970999357, f = 0.00042776941}, {i = 32630, f = 4.57243689e-41}, {
                i = 39013680, f = 1.55239835e-37}, {i = 0, f = 0}, {i = 699915408, f = 8.16509403e-14}, {i = 32630, f = 4.57243689e-41}, {i = 699915436, f = 8.16511301e-14}, {i = 32630, f = 4.57243689e-41}, {i = 983767230, 
                f = 0.00124432868}, {i = 32630, f = 4.57243689e-41}, {i = 39013680, f = 1.55239835e-37}, {i = 0, f = 0}, {i = -333885184, f = -7.41392648e+26}, {i = 1444023606, f = 4.01463595e+13}, {i = 403094688, 
                f = 1.74143254e-24}, {i = 32630, f = 4.57243689e-41}, {i = 39014048, f = 1.5524396e-37}, {i = 0, f = 0}}}}
        n = <optimized out>
        length = 21556
        block_size_max = <optimized out>
        __func__ = "pa_sink_render_into"
        __PRETTY_FUNCTION__ = "pa_sink_render_into"
#8  0x00007f763aa62379 in pa_sink_render_into_full (s=0x2527d90, target=0x7f7629b7dda0) at pulsecore/sink.c:1273
        chunk = {memblock = 0x255acf0, index = 13004, length = 21556}
        l = 21556
        d = <optimized out>
        __func__ = "pa_sink_render_into_full"
        __PRETTY_FUNCTION__ = "pa_sink_render_into_full"
#9  0x00007f762b0a4b80 in mmap_write (on_timeout=false, polled=false, sleep_usec=<synthetic pointer>, u=0x2520320) at modules/alsa/alsa-sink.c:632
        chunk = {memblock = 0x255acf0, index = 0, length = 34560}
        err = <optimized out>

        frames = 8640
        sframes = <optimized out>
        p = <optimized out>
        areas = 0x251fef0
        offset = 61424
        n = <optimized out>
        n_bytes = 34560
        r = <optimized out>
        after_avail = false
        process_usec = 20000
        left_to_play = <optimized out>
        work_done = false
        max_sleep_usec = 180000
        j = 1
#10 thread_func (userdata=0x2520320) at modules/alsa/alsa-sink.c:1656
        work_done = <optimized out>
        sleep_usec = 0
        on_timeout = <optimized out>
        ret = <optimized out>
        rtpoll_sleep = 0
        u = 0x2520320
        revents = 0
        __func__ = "thread_func"
        __PRETTY_FUNCTION__ = "thread_func"
#11 0x00007f7639e26308 in internal_thread_func (userdata=0x25269b0) at pulsecore/thread-posix.c:83
        t = 0x25269b0
#12 0x00007f7638180d90 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#13 0x00007f7637821f5d in clone () from /lib64/libc.so.6
No symbol table info available.
Comment 1 Tvrtko Ursulin 2012-09-21 14:49:35 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:46 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.