<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash when enabling echo cancellation and also specifying PULSE_PROP="filter.want=echo-cancel media.role=phone""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104958">104958</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when enabling echo cancellation and also specifying PULSE_PROP="filter.want=echo-cancel media.role=phone"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rocketraman@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=137179" name="attach_137179" title="gdb backtrace with symbols">attachment 137179</a> <a href="attachment.cgi?id=137179&action=edit" title="gdb backtrace with symbols">[details]</a></span>
gdb backtrace with symbols

I am able to consistently reproduce a SEGFAULT on 11.1 (RPM Fedora
pulseaudio-11.1-7.fc27.x86_64, with the two echo cancellation patches @
<a href="https://patchwork.freedesktop.org/patch/187359/">https://patchwork.freedesktop.org/patch/187359/</a> applied on top.

To do this, I run pulseaudio with the following in /etc/pulse/default.pa:

load-module module-echo-cancel use_master_format=1 aec_method=webrtc
aec_args="analog_gain_control=0 digital_gain_control=1 noise_suppression=1"
source_name=echoCancel_source sink_name=echoCancel_sink
set-default-source echoCancel_source
set-default-sink echoCancel_sink

and then I run Zoiper as follows:

PULSE_PROP="filter.want=echo-cancel media.role=phone" /opt/Zoiper/zoiper

This then causes a crash in pulseaudio:

Here are the last few lines of the log:

I: [pulseaudio] protocol-native.c: Final latency 50.00 ms = 12.50 ms + 2*12.50
ms + 12.50 ms
D: [alsa-sink-USB Audio] alsa-sink.c: Latency set to 12.50ms
D: [alsa-sink-USB Audio] alsa-sink.c: hwbuf_unused=381600
D: [alsa-sink-USB Audio] alsa-sink.c: setting avail_min=95701
D: [alsa-sink-USB Audio] module-echo-cancel.c: Sink input update max request
4800
D: [alsa-sink-USB Audio] alsa-sink.c: Requesting rewind due to latency change.
D: [alsa-sink-USB Audio] module-echo-cancel.c: Sink input update requested
latency 12500
D: [alsa-sink-USB Audio] alsa-sink.c: Requested to rewind 384000 bytes.
D: [alsa-sink-USB Audio] alsa-sink.c: Limited to 9344 bytes.
D: [alsa-sink-USB Audio] alsa-sink.c: before: 2336
D: [alsa-sink-USB Audio] alsa-sink.c: after: 2336
D: [alsa-sink-USB Audio] alsa-sink.c: Rewound 9344 bytes.
D: [alsa-sink-USB Audio] sink.c: Processing rewind...
D: [alsa-sink-USB Audio] sink-input.c: Have to rewind 9344 bytes on render
memblockq.
D: [alsa-sink-USB Audio] module-echo-cancel.c: Sink process rewind 0
D: [alsa-sink-USB Audio] sink-input.c: Have to rewind 9344 bytes on render
memblockq.
D: [alsa-sink-USB Audio] source.c: Processing rewind...
D: [alsa-source-USB Audio] module-echo-cancel.c: Sink rewind (0)

Thread 1 "pulseaudio" received signal SIGSEGV, Segmentation fault.
0x00007fffcbbf81c1 in find_paired_master (is_sink_input=true, o=0x5555559921a0,
filter=0x555555a55810, u=0x5555559c0040) at modules/module-filter-apply.c:204
204                             filter->source_master =
so->source->output_from_master->source;


And I have attached the complete backtrace with symbols from `thread apply all
bt full`.</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>