Ticket #398 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Assertion 'PA_SINK_INPUT_IS_LINKED(st)' failed

Reported by: pl4nkton Owned by: lennart
Milestone: Component: daemon
Keywords: Cc:

Description

D: memblockq.c: memblockq sanitized: maxlength=4194304, tlength=44100, base=4, prebuf=44100, minreq=3528 maxrewind=0 I: protocol-native.c: Final latency 460,00 ms = 210,00 ms + 2*20,00 ms + 210,00 ms E: sink.c: Assertion 'PA_SINK_INPUT_IS_LINKED(st)' failed at pulsecore/sink.c:1033, function pa_sink_check_suspend(). Aborting. Aborted

Attachments

strace.pulseaudio (154.5 kB) - added by patrick.steiner 3 years ago.
Strace File
0001-Revert-back-to-using-pa_-sink-source-_used_by-as-o.patch (1.3 kB) - added by coling 3 years ago.
Potential fix

Change History

  Changed 3 years ago by lennart

Please provide a full backtrace as described here:

http://pulseaudio.org/wiki/Community#PatchesBugsTranslations

  Changed 3 years ago by lennart

  • summary changed from pa from git is broken to Assertion 'PA_SINK_INPUT_IS_LINKED(st)' failed

  Changed 3 years ago by felipec

Here's the backtrace:

#0  0xffffe424 in ?? ()
#1  0xbff4e760 in ?? ()
#2  0x00000006 in ?? ()
#3  0x000017f8 in ?? ()
#4  0x4fc5f660 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#5  0x4fc61028 in abort () at abort.c:88
#6  0xb7f2c676 in pa_sink_check_suspend (s=0x8cd7b80) at pulsecore/sink.c:1033
#7  0xb2a81831 in device_state_changed_hook_cb (c=0x8cb4b98, o=0x8cd7b80, u=0x8cfc9f0) at modules/module-suspend-on-idle.c:316
#8  0xb7f09921 in pa_hook_fire (hook=0x8cb4cac, data=0x8cd7b80) at pulsecore/hook-list.c:104
#9  0xb7f26e32 in sink_set_state (s=0x8cd7b80, state=PA_SINK_RUNNING) at pulsecore/sink.c:304
#10 0xb7f2d56f in pa_sink_update_status (s=0x8cd7b80) at pulsecore/sink.c:446
#11 0xb7f1eda0 in update_n_corked (i=0x0, state=6) at pulsecore/sink-input.c:306
#12 0xb7f24490 in pa_sink_input_put (i=0x8d02ee0) at pulsecore/sink-input.c:448
#13 0xb2aaf68a in command_create_playback_stream (pd=0x8cfe0a0, command=3, tag=2, t=0x8cb9ab0, userdata=0x8cfe910) at pulsecore/protocol-native.c:1079
#14 0xb7e967a1 in pa_pdispatch_run (pd=0x8cfe0a0, packet=0x8d00d40, creds=0x8d00ac0, userdata=0x8cfe910) at pulsecore/pdispatch.c:239
#15 0xb2aab532 in pstream_packet_callback (p=0x8d009f8, packet=0x8d00d40, creds=0x8d00ac0, userdata=0x8cfe910) at pulsecore/protocol-native.c:4075
#16 0xb7e9ad43 in do_something (p=0x8d009f8) at pulsecore/pstream.c:816
#17 0xb7e9ba29 in io_callback (io=0x8cb6a88, userdata=0x17f8) at pulsecore/pstream.c:213
#18 0xb7e86768 in callback (m=0x8cb3a74, e=0x8cb9a28, fd=9, f=<value optimized out>, userdata=0x8cb6a88) at pulsecore/iochannel.c:119
#19 0xb7ecbc8b in pa_mainloop_dispatch (m=0x8cb3a38) at pulse/mainloop.c:683
#20 0xb7ecc001 in pa_mainloop_iterate (m=0x8cb3a38, block=1, retval=0xbff4f1c4) at pulse/mainloop.c:926
#21 0xb7ecc0c4 in pa_mainloop_run (m=0x8cb3a38, retval=0xbff4f1c4) at pulse/mainloop.c:941
#22 0x08051103 in main (argc=1, argv=0xbff4f274) at daemon/main.c:950

  Changed 3 years ago by patrick.steiner

I can confirm the same problem on my machine

Changed 3 years ago by patrick.steiner

Strace File

  Changed 3 years ago by coling

Not being an expert I'm not sure what the fix is here, but I also confirm the problem.

Lennart probably wont be able to respond for the next month or so, so I can say that this fix/workaround is probably one of two things:

  • Use pa_sink_used_by() and pa_source_used_by() as opposed to the pa_xxx_check_suspend() in modules-suspend-on-idle on lines 316 and 327 respectively. Or
  • Change the offending ASSERT to a if (!blah) continue (and it's companion source version too).

I've tested both approaches and they appear to work. As the check_suspend function is widely used elsewhere I suspect the latter is the more correct (even if it's not ultimately the correct fix)

Changed 3 years ago by coling

Potential fix

follow-up: ↓ 7   Changed 3 years ago by coling

Erm I meant "I suspect the former is the more correct" above :s

in reply to: ↑ 6   Changed 3 years ago by felipec

I have a similar fix, but I only do it on the sink. Probably the sink is not linked at that point?

  Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed

Fixed in r82f09b6.

Note: See TracTickets for help on using tickets.