Bug 81802

Summary: Synchronous name service queries are done from the main thread -> potential long delays
Product: PulseAudio Reporter: Tanu Kaskinen <tanuk>
Component: coreAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tanu Kaskinen 2014-07-27 09:08:25 UTC
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: https://bugs.tizen.org/jira/browse/TC-1130

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.
Comment 1 GitLab Migration User 2018-07-30 10:05:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/204.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.