<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:arun@accosted.net" title="Arun Raghavan <arun@accosted.net>"> <span class="fn">Arun Raghavan</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [abrt] pulseaudio: pa_atomic_load(): pulseaudio killed by SIGSEGV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90416">bug 90416</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>wim.taymans@gmail.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [abrt] pulseaudio: pa_atomic_load(): pulseaudio killed by SIGSEGV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90416#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [abrt] pulseaudio: pa_atomic_load(): pulseaudio killed by SIGSEGV"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90416">bug 90416</a>
              from <span class="vcard"><a class="email" href="mailto:arun@accosted.net" title="Arun Raghavan <arun@accosted.net>"> <span class="fn">Arun Raghavan</span></a>
</span></b>
        <pre>Just to summarise the problem, here's what's happening:

0. We're running a playback and capture stream, which caused module-echo-cancel
to be autoloaded

1. We disable the card profile on which the echo canceller is running, making
the underlying sink go away

2. At the end of the profile change, the m-e-c sink-input gets killed (since it
said it could not be moved, which is what we do in the autoload case)

3. This makes us unload the m-e-c module, at which time we try to move the
original client stream away

4. At this point, there is no underlying sink for m-e-c, so the asyncmsgq is
NULL, and any messages that might be sent during the move will cause a crash
(we don't deal with a non-existent asyncmsgq, and trying to use something fake
causes sink input state to go out of whack and crash in other places). 

One way to fix this problem, is to not have the echo-cancel sink-input refuse
to move (which we do when the module is autoloaded). Instead, we allow the move
to happen, and then when it is completed, if we were autoloaded, we unload
ourselves.

This means that we'll never be in an inconsistent state with respect to the
existence of an underlying sink, which solves the problem at source. On the
other hand, this feels a bit ugly as a solution.

I'll hack this up, but I'd like to hear thoughts on this approach if there are
any.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>