Bug 81802 - Synchronous name service queries are done from the main thread -> potential long delays
Summary: Synchronous name service queries are done from the main thread -> potential l...
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-27 09:08 UTC by Tanu Kaskinen
Modified: 2018-07-30 10:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.