Summary: | KDE apps have problems with name resolution | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | David Johnson <dj> |
Component: | general | Assignee: | Thiago Macieira <thiago> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
David Johnson
2005-10-25 00:28:26 UTC
The code that does this hasn't changed in two releases (since KDE 3.3). Especially not between KDE 3.4.1 and 3.4.3. So I this is certainly not a bug that was introduced. It could be a bug that has been there all along, but I also doubt it. Can you test one account only and paste the ethereal dump? You may also send the -w dump to my email, if you prefer. OK, here's the Ethereal output when checking one host, which I've found always works as expected and doesn't cause 'Unknown host' errors: Standard query A mail.mydomain.co.uk Standard query AAAA mail.mydomain.co.uk Standard query response <the correct IP> Standard query response Standard query AAAA mail.mydomain.co.uk.my.search.co.uk Standard query response, No such name Standard query A mail.mydomain.co.uk Standard query response <the correct IP> The output is exactly the same when I don't have a search line, just without the query and response for mail.mydomain.co.uk.my.search.co.uk (so it still queries and gets a valid response for the domain twice). I can still reproduce the 'Unknown host' errors when KMail is checking more than one account at the same, or different, domains. I will send you the -w output by e-mail. Indeed there's nothing that I can take from your ethereal dump (sent in private). Can you reproduce this same problem in Konqueror? If you can, please try the following: 1) open Konqueror and get it ready to cause the error 2) run: killall kio_http 3) find kdeinit's PID 4) run: strace -f -o /tmp/trace -p kdeinits-PID 5) get Konqueror to cause the error 6) Ctrl+C the strace and send me the trace file Konqueror doesn't give any errors, but it fails to load most images/style-sheets on a page. It gives similar Ethereal output to the above when doing DNS queries. I'll send you the trace file. I've reread your trace after several days, with a fresh mind. I still cannot explain what I am seeing. Here are the lines: 8720 sendto(9, "\22#\1\0\0\1\0\0\0\0\0\0\10slashdot\3org\0\0\1\0\1", 30, 0, NULL, 0) = 30 8721 recvfrom(10, "\22#\201\200\0\1\0\1\0\5\0\5\10slashdot\3org\0\0\1\0\1"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.50.1")}, [16]) = 235 Translation: DNS query of slashdot.org on socket fd 9 from thread with PID 8720, reply on fd 10 on another thread. This cannot happen. The only way of a reply coming in through the wrong socket is if: a) both sockets had the same address (SO_REUSEADDR), but libresolv doesn't do that b) the kernel got confused and sent the data to the wrong file descriptor c) the name server sent the reply back to the wrong address d) something in-between (a DNS proxy, or NAT or whatever) mixed up and moved the reply to the wrong address The fact that the replies are coming in in the wrong sockets explains why name resolution sometimes fails: libresolv will send a query up to 3 times if it gets no answer. If the answers are being delivered to the wrong fd -- especially the wrong thread -- it will conclude that the NS server is unavailable and report as error. So, I'm sorry, I don't know how to fix this bug. I'm stumped. hmmm, I'm not sure what to do next in that case. I can rule out my DNS and router hardware as the problem didn't exist until I upgraded my distribution (unless some change in the kernel/libresolv has triggered a bug in the router...). The strange thing is that this bug only seems to affect KDE apps - FireFox, ping, ssh etc. all seem to work normally. But it seems that I'm the only person seeing this bug, in which case it probably isn't worth spending too much time on. I can 'fix' it simply by commenting out my search line in resolv.conf, so it's not too big a deal. Thanks for your help in figuring out what's going on though! Closing this bug -- it only affects me so almost certainly isn't really a KDE bug. |