<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><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> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PA crash on Assertion 'pa_atomic_load(&b->pool->stat.n_imported) > 0"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95352">bug 95352</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;">Blocks</td>
           <td>
                
           </td>
           <td>96750
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PA crash on Assertion 'pa_atomic_load(&b->pool->stat.n_imported) > 0"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95352#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PA crash on Assertion 'pa_atomic_load(&b->pool->stat.n_imported) > 0"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=95352">bug 95352</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>This doesn't seem like a regression, but since this is a crasher, I'll mark
this tentatively as a 10.0 blocker anyway.

The current status is that I'm looking into the possibility of removing all
memblock type changes. It seems nicer than adding more locking to make the type
changes safe. There are only two cases where we change memblock types on the
fly: we make imported memblocks local when a client disconnects (related to
this crash), and alsa-source creates memblocks from alsa memory that is valid
only for a short time, so before the memory becomes invalid, the audio has to
be copied elsewhere and the memblock type has to be changed.

Making imported memblocks local doesn't seem necessary, because I think the
underlying memory area stays accessible as long as needed. Maybe the idea was
to make sure that we don't keep old client mempools around in the server for
longer than absolutely necessary, but I don't understand why having them around
a bit longer would be a problem.

The alsa-source use case seems to be about avoiding one memory copy, if the
recorded audio isn't needed after the pa_source_post() call. When dealing with
normal client streams, however, the memory has to be copied anyway before it
can be sent to the client. I can't think of any use cases where the current
approach would save memory copies, except the case where a source runs without
anything connected to it, but that's hardly a use case worth optimizing for...

I don't expect fast progress on this, and I worry how I can reach confidence in
not breaking anything. The code is complicated, and at least so far I don't
feel I understand it well, and I plan to remove big parts of it (like memblock
revoking and releasing - those things seem pretty useless to me, but usually
things have purpose)...</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [TRACKER] PulseAudio 10.0 release"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=96750">Bug 96750</a>] [TRACKER] PulseAudio 10.0 release
              </li>
          </ul>
        </div>
        <br>

      <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>