[Qt-interest] DNS caching in Qt

Thiago Macieira thiago at kde.org
Wed Jul 6 14:17:17 CEST 2011


Em Wednesday, 6 de July de 2011, às 16:52:39, Mandeep Sandhu escreveu:
> > Please check if the DNS server is at fault. Many years ago, we had a very
> > ugly problem with a faulty firmware in a very popular CPE router in
> > Germany and the manufacturer refused to fix. Later, when Safari was
> > affected by the same problem, they finally fixed it.
> 
> Ok...any pointers as to what to look for specifically which might
> point to a fault in the server?

Well, by capturing the traffic. But I'm not convinced it is a DNS server fault.

> >> * Are DNS lookup failures cached too or only successful resolutions
> >> cached?
> > 
> > I don't see anything in the code that would indicate that negative results
> > are treated specially. So I guess they are cached.
> 
> Well, there can be 2 kind of lookup failures in the scenario I mentioned.
> 
> 1. The DNS itself was not reachable (maybe the routes were not setup by NM
> yet) 2. The DNS responds, but with a lookup failure.
> 
> I think the cache would be updated only on (2), right? The DNS not
> being reachable should not alter the cache in any way.

Right, but I don't think it does.

> > I can't find the code to do that either.
> 
> This was the bug report that I read:
> http://bugreports.qt.nokia.com/browse/QTBUG-12814
> 
> I had read your comment, where you point out that DNS cache is flushed
> if resolv.conf is modified! :)

Because I thought the code did that. But I can't find it.

> > Can you try to touch /etc/resolv.conf when the application isn't finding
> > the hostname and check if it changes behaviour?
> 
> Yes. I did that after reading your comment on that bug report. I just
> 'touch'ed the file...lookup was still failing. Only way to recover is
> to wait for some time before making a request.
> 
> > If it doesn't, please file a bug report.
> 
> Can I? Because I'm using Qt 4.6.2 on embedded Linux (that won't be
> supported right?).

Well, a bug is a bug. And it appears to be present in 4.7 and 4.8 too.

> I'll see if I can replicate this issue with 4.7.3 on a Linux desktop
> and then probably report a bug if needed.

Thanks, that would be useful.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110706/1e511122/attachment.bin 


More information about the Qt-interest-old mailing list