<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Synchronous name service queries are done from the main thread -> potential long delays"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=81802">81802</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>Synchronous name service queries are done from the main thread -> potential long delays
          </td>
        </tr>

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

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tanuk@iki.fi
          </td>
        </tr>

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

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

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

        <tr>
          <th>Component</th>
          <td>core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>pa_get_fqdn() does a name service query with getaddrinfo(). The query is
synchronous, and can take a long time, and since pa_get_fqdn() is called from
the server's main thread (e.g. module-native-protocol-tcp via
pa_socket_server_get_address()), the server will get stalled for the duration
of the query. This was originally reported in Tizen's bug tracker:
<a href="https://bugs.tizen.org/jira/browse/TC-1130">https://bugs.tizen.org/jira/browse/TC-1130</a>

If the query to get the FQDN takes a long time, the network configuration can
perhaps be considered broken, but nevertheless, I think we should be resistant
to misconfigured networks. pa_get_fqdn() can't be changed to an asynchronous
version, because it's part of the stable API, but we can add a new function
pa_get_fqdn_async() that uses libasyncns. Then all code that currently uses
pa_get_fqdn() should be reviewed and changed to use pa_get_fqdn_async() if
necessary.</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>