Libpurple on Mac OS X Lion connection problems

Paul Aurich paul at darkrain42.org
Tue Jul 19 12:38:25 EDT 2011


On 2011-07-18 23:49, Alex wrote:
> The client was successfully sending the DNS request but was not processing any reply from the server. I did a Wireshark capture and the server was sending the response, libpurple just didn't seem to process it.
> 
> This is how the libpurple log looked (filtered by dns):
> (19:02:40) dnsquery: Performing DNS lookup for vcs1.msn.yahoo.com
> (19:02:41) dns: Created new DNS child 925, there are now 1 children.
> (19:02:41) dns: Successfully sent DNS request to child 925
> <--No more dns logs after this point-->

It sounds like a race condition of some sort.  I know Adium has had
issues with the interaction between OS X threading and libpurple's
forking resolver processes.

If you wanted to troubleshoot this further (see below for a likely
better workaround), I'd suggest getting the OS X equivalent of an
strace/ltrace on the main process (following fork()s), to see what calls
the DNS child is making when it hangs...

or attaching gdb to it and seeing what its up to.

> After some tests, the problem is solved by disabling PURPLE_DNSQUERY_USE_FORK at dnsquery.c

This drops you back to a singly threaded lookup (the query will block
all of libpurple), so isn't ideal.

> I am still wondering what could have changed on Lion that is causing this problem, if somebody know, LMK.

Some of the Adium folks (some on this list, more on devel at adium.im) may
be able to weigh in on changes that could have caused this.

That said, I know that Adium implements UI Ops for the lookup code (DNS
query and DNS SRV) which allow them to do natively non-blocking lookups.
 You may want to look into this (for SRV/TXT lookups, hold off until the
next release, which contains functionality fixes).

~Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20110719/94130162/attachment.sig>


More information about the Devel mailing list