[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gethostbyname() fails on the FireBee



Just back from vacation.

Unfortunately, I don't see this on my Falcon and my FireBee is out of
commission at the moment.

Alan.

On 30/08/14 20:53, Vincent Rivière wrote:
> Hello.
>
> After recompiling ping, I noticed that gethostbyname() fails to do DNS
> lookups on the FireBee. I suspect it is a timing problem.
>
> See the attached testcase. It just does a simple gethostbyname().
>
> On the FireBee, it is extremely strange:
> - if I run it normally, it fails
> - but if I run it with strace, it succeeds!
>
> On ARAnyM, it always works.
>
> I sniffed the packets, here is what happens when it fails:
> - the DNS request is sent 3 times, very quickly
> - as a result, the DNS server answers 3 times
> - then FreeMiNT answers an ICMP "Port unreachable", 3 times
>
> It looks like FreeMiNT sends a DNS request, then quickly closes the
> socket and retries, before the answer is received.
> However, ping works fine with IP addresses or static hosts put in
> /etc/hosts. This is not surprising as such cases don't produce DNS
> lookups.
>
> The fact it works fine on the FireBee with strace is very weird. This
> is why I suspect a timing problem.
> In the case where it works, strace outputs:
> - Fconnect
> - Fsento
> - Fpoll
> - Frecvfrom
>
> That Fpoll() reminds me some recent select() issues in the kernel.
> Could it be related?
>
> Maybe something is too fast or wrong in mintv4e.prg...
>
> Alan and others, do you have any idea?
>
> NB: I compile with MiNTLib CVS-20140312.
>