<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:pierre-bugzilla@ossman.eu" title="Pierre Ossman <pierre-bugzilla@ossman.eu>"> <span class="fn">Pierre Ossman</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Multiple pulseaudio crashes."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90108">bug 90108</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;">Status</td>
           <td>NEEDINFO
           </td>
           <td>NEW
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Multiple pulseaudio crashes."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90108#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Multiple pulseaudio crashes."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90108">bug 90108</a>
              from <span class="vcard"><a class="email" href="mailto:pierre-bugzilla@ossman.eu" title="Pierre Ossman <pierre-bugzilla@ossman.eu>"> <span class="fn">Pierre Ossman</span></a>
</span></b>
        <pre>I think I'm hitting this, and I've found out why.

What happens is this:

 1. module-always-sink is loaded
 2. it pulls in module-sink
 3. pulseaudio is shut down
 4. pa_module_unload_all() is called
 5. module-always-sink is unloaded
 6. it requests an unload of the module-sink it loaded
 7. pa_module_unload_all() proceeds to unload module-sink
 8. pa_core_free() is called
 9. an assert is triggered as the request in 6. was never handled

A quick fix is to clear out core->modules_pending_unload in pa_module_free() as
well.


A note is that module-always-sink tries to check if the core is shutting down.
However, checking for PA_CORE_SHUTDOWN seems highly suspect as that state is
entered at a point where are cleanup is already done and the core object is
about to be freed. In other words, if it is safe to dereference core->state,
then state cannot be PA_CORE_SHUTDOWN. So all of commit 967c17a1 could be
pointless.</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>