<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - unloading module-remap-sink while module-combine-sink is using it causes Assertion '*_head == _item' failed at modules/module-combine-sink.c:818, function output_remove_within_thread()."
href="https://bugs.freedesktop.org/show_bug.cgi?id=98617#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - unloading module-remap-sink while module-combine-sink is using it causes Assertion '*_head == _item' failed at modules/module-combine-sink.c:818, function output_remove_within_thread()."
href="https://bugs.freedesktop.org/show_bug.cgi?id=98617">bug 98617</a>
from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
<pre>I was able to reproduce the crash with the provided script. In case someone
else tries to reproduce this too, note that I first failed to reproduce when I
issued the commands manually, so it's best to use the script. I would guess the
manual commands failed to cause a crash, because the sinks had time to suspend
before running the unload-module command.
Here are my investigation results so far:
When module-remap-sink is unloaded, it has to remove the virtual sink input
that connects it to the master sink. When the "detach" callback of the sink
input is called, module-remap-sink propagates the detach call to all sink
inputs connected to it, so all sink inputs connected to the sink tree get
detached. Then later, when module-combine-sink removes its virtual sink input,
the detach callback gets called again. module-combine-sink assumes that the
detach callback will be called only once, and the result of an incorrect
assumption is a crash.
I think it's reasonable to assume that the detach callback won't be called for
streams that are already detached. I'll try if skipping the detach callback for
already-detached sink inputs works.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>