logo       

Re: stalls with concurrent host name resolvers: msg#00021

lib.boost.asio.user

Subject: Re: stalls with concurrent host name resolvers


On Nov 20, 2006, at 11:22, Christopher Kohlhoff wrote:

> Hi Arvid,
>
> Arvid Norberg <arvid-M9ekpT6mRt2zQB+pC5nmwQ@xxxxxxxxxxxxxxxx> wrote:
>> Ok, it happens every time for me. I did a testrun with 10
>> io_services (and afaik that means 10 host resolver threads).
>> Most host resolver threads appeared to be blocked at this
>> point:
>>
>> #0 0x9000ab48 in mach_msg_trap
>> #1 0x9000aa9c in mach_msg
>> #2 0x9002beb0 in _lookup_all_secure
>> #3 0x9002bdbc in _lookup_all
>> #4 0x9005a564 in lu_gethostbyname
>> #5 0x90078324 in getipnodebyname
>
> Hmm, well i'd guess it is an OS problem if it's all the way down
> in there. When I get some time I will write a test program that
> just calls getipnodebyname in a loop from a lot of different
> threads, to confirm whether the problem is unrelated to asio.
>
> Any suggestions as to a workaround? I could serialise all calls
> to getipnodebyname using a mutex, but in that case I may as well
> be using the non-thread-safe getaddrinfo!

Yeah, I guess the main problem with serializing the calls is that
all resolvers would be waiting if a single one would block because it
has to actually ask the DNS servers. That is the case right now with
a single io_service anyway though.

thank you.
--
Arvid Norberg



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise