[pulseaudio-tickets] [PulseAudio] #752: asyncns timeout causes delay when pulseaudio service not running

PulseAudio trac-noreply at tango.0pointer.de
Tue Dec 22 03:47:53 PST 2009


#752: asyncns timeout causes delay when pulseaudio service not running
----------------------------------------+-----------------------------------
 Reporter:  jezaustin                   |       Owner:  lennart
     Type:  defect                      |      Status:  new    
Milestone:                              |   Component:  core   
 Keywords:  asyncns timeout socket DNS  |  
----------------------------------------+-----------------------------------
 Client applications try to connect to pulseaudio, and if there is no
 service running the pa_context_connect function blocks for about 5s. I
 discovered this through testing the firefox betas
 (https://bugzilla.mozilla.org/show_bug.cgi?id=533470), and I've also
 raised the issue with libcanberra
 (http://bugs.freedesktop.org/show_bug.cgi?id=25742).

 To reproduce:
 1) compile pulseaudio with HAVE_ASYNCNS.
 2) make sure pulse is not running
 3) run any application which attempts a pa_context_connect.

 There is no delay at all if either
 a) pulseaudio process is running, or
 b) pulseaudio is compiled without HAVE_ASYNCNS.

 When the symptoms are showing, an error message "socket(): Address family
 not supported by protocol" is displayed immediately, then the delay is
 experienced after which the client application resumes. I think that
 pulsecore/socket-client.c:486 in pa_socket_client_new_string calls
 asyncns_getaddrinfo which produces the error message, then line 487 calls
 start_timeout which produces the delay.

 Is there any way of avoiding the timeout when using ASYNCNS?

-- 
Ticket URL: <http://pulseaudio.org/ticket/752>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list