Subject: Re: C-ares timeout issue

Re: C-ares timeout issue

From: Ben Greear <greearb_at_candelatech.com>
Date: Tue, 09 Nov 2010 09:19:37 -0800

On 11/09/2010 07:43 AM, Brian Yoder wrote:
> I'm using C-ares against one server with UDP enabled. All goes
> well--very very well. Millions and millions of times in a row. But it
> fails when the first timeout is detected. From then on, all subsequent
> queries result in timeout failures until the application linked to
> C-ares is stopped and restarted.
>
> Inspection of the code doesn't seem to show any obvious problems. When a
> struct query is created, its tries and timeouts values are cleared properly.
>
> One thing I did notice was that when a timeout is detected, the UDP
> socket should not be closed. UDP is connection-less and oblivious to
> whatever issues the server has. But if the UDP socket is closed and then
> re-opened (which it shouldn't be), I wouldn't expect any subsequent
> error to stick at ARES_ETIMEOUT.

Can you sniff to see if any packets are sent after the timeout
happens?

Can you reproduce by yanking the ethernet cable at an appropriate
time to cause a timeout, or maybe adding a network emulator
such as netem to cause timeouts?

An strace of the program after timeout happens might be nice.

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
Received on 2010-11-09