----- Original Message ----- 
From: "Kristian Kielhofner" <[EMAIL PROTECTED]>
Sent: Thursday, October 12, 2006 3:34 AM

> Jack wrote:
>> Kristian,
>>
>> I am only using IP numbers everywhere.
>> My routers are draytek 3300V which connects offices thru VPN connections
>> so changing that isn't a good idea.
>> I will try setting up a local caching dns server to test, if there is no
>> other easier way?
>
> Jack,
>
> Interestingly enough one of my colleagues here found this problem
> today.  A work-around has been committed to trunk and 0.4.  Basically,
> there is a new rc.conf variable called "LOCALDNS".  If you specify
> LOCALDNS=yes AND have INTIF defined, AstLinux will use dnsmasq for
> resolving local addresses.  Previously, dnsmasq was only used for
> clients.  Now it can be used by AstLinux itself.  Hopefully that will
> help insulate Asterisk from the apparent problems with DNS in uclibc
> (Asterisk has dns problems of its own, and uclibc doesn't help the
> matter).

By the way: last year I had encountered similar problems on the port of
Asterisk for the OpenWRT platform (also based on uClibc): a failure in the
authoritative DNS server for a single peer, and the consequent long timeout
waits, were affecting all the remaining peers as well.

After some investigation, my findings seemed to indicate that uClibc's
gethostbyname_r() was not reentrant (lock-free multi-thread safe) and not
simply MT-safe either. Here's the description, complete with a test case:

http://forum.openwrt.org/viewtopic.php?pid=10060#p10060

At that time I had also written to Erik Andersen, uClibc's developer, and he
ran tests versus the latest uClibc: but the results he sent me back appeared
to indicate that his version was now MT-safe, but still not fully
re-entrant. This means that a DNS resolution "stuck" in one thread could
block all the other threads that attempt other DNS resolutions...

Since then, I did not pursue this matter further, but from what I hear now
it appears that some DNS issues still persist.

By the way, an MT-safe replacement for gethostbyname_r(), written by myself,
used to be (and perhaps still is) in Asterisk's code (module utils.c), but
#ifdef'd for *BSD platforms only. The comment (not written by me) wrongly
identifies as "recursive", although it's only MT-safe with a lock to protect
calls to the native gethostbyname(). I had posted that code, placing it in
the public domain, at http://www.cygwin.com/ml/cygwin/2004-04/msg00532.html
, and someone lifted it and added it to Asterisk's DNA. So, if you guys
decide to try it and one day it'll make Astlinux explode, it won't be my
fault ;-)

Cheers --

Enzo

_______________________________________________
Astlinux-users mailing list
[email protected]
http://lists.kriscompanies.com/mailman/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to