Re: DNS caching(?) page-hangup issues and Opera 10.X
Eirik Byrkjeflot Anonsen <[email protected]> Fri, 09 Jul 2010 08:14:36 +0200
| Newsgroups | gmane.comp.web.opera.linux |
|---|---|
| Message-ID | <[email protected]> |
Kenneth Crudup <[email protected]> writes: >> I'll run it with "-debugdns", but it >> will take some time for that output to be realized, as restarting Opera >> with whatever network I'm currently never has any problem with DNS >> lookups, so it'll run all morning 'till I switch networks later today. > > This is what I get. Not sure why it's returning "EIO", as there's > most definately a running network, and when I ran both "dig" and > your test program on some of thse same names both programs returned > a value immediately. > > ---- > Undocumented return, -5, from getaddrinfo(clients1.google.com)DNS look-up failed for clients1.google.com > Undocumented return, -5, from getaddrinfo(gadget-doc-examples.googlecode.com)DNS look-up failed for gadget-doc-examples.googlecode.com > Undocumented return, -5, from getaddrinfo(maps.google.com)DNS look-up failed for maps.google.com > Undocumented return, -5, from getaddrinfo(maps.google.com)DNS look-up failed for maps.google.com > Undocumented return, -5, from getaddrinfo(maps.google.com)DNS look-up failed for maps.google.com > Undocumented return, -5, from getaddrinfo(images.ibsrv.net)DNS look-up failed for images.ibsrv.net > Undocumented return, -5, from getaddrinfo(images.ibsrv.net)DNS look-up failed for images.ibsrv.net > Undocumented return, -5, from getaddrinfo(maps.google.com)DNS look-up failed for maps.google.com > Undocumented return, -5, from getaddrinfo(api.connect.facebook.com)DNS look-up failed for api.connect.facebook.com > Undocumented return, -5, from getaddrinfo(static.ak.fbcdn.net)DNS look-up failed for static.ak.fbcdn.net > Undocumented return, -5, from getaddrinfo(pxl.ibpxl.com)DNS look-up failed for pxl.ibpxl.com > > Undocumented return, -5, from getaddrinfo(mail.google.com)DNS look-up failed for mail.google.com > Undocumented return, -5, from getaddrinfo(mail.google.com)DNS look-up failed for mail.google.com > Undocumented return, -5, from getaddrinfo(pxl.ibpxl.com)DNS look-up failed for pxl.ibpxl.com > Undocumented return, -5, from getaddrinfo(maps.google.com)DNS look-up failed for maps.google.com > Undocumented return, -5, from getaddrinfo(static.myopera.com)DNS look-up failed for static.myopera.com > Undocumented return, -5, from getaddrinfo(snapshot.opera.com)DNS look-up failed for snapshot.opera.com > ... > ---- Interesting. Now we know exactly where the problem appears. That is definitely helpful. I would expect that this problem only occurs if a process has looked up a name before the network switch and then tries to look up another name after the switch. Since dig only looks up once, I don't think it will ever fail (also, I don't think dig is using libc, but is talking directly to the DNS server. That's what it is supposed to be used for.) In order to get my program to fail, I think you need to start it and have it look up an address while opera is still working fine. Then I am hoping that it will fail at the same time that opera fails. If you can not reproduce the error at will, you may want to add three extra lines to my program so it loops forever. (Maybe I should rewrite it to use getaddrinfo... And properly report errors... Oh, well.). eirik #include <netdb.h> #include <stdio.h> #include <unistd.h> int main(int argc, char ** argv) { if (argc < 2) { fprintf(stderr, "usage: lookuphostloop <hostname> <hostname>...\n"); return 1; }; while (true) { for (int hostnum = 1; hostnum < argc; hostnum ++) { if (hostnum > 1) sleep(10); char * hostname = argv[hostnum]; printf("Looking up %s ... ", hostname); struct hostent * he = gethostbyname(hostname); if (he == 0) { printf("error\n"); } else if (he->h_addr_list[0] == 0) { printf("none\n"); } else { for (int i = 0; i < he->h_length; i++) { if (i != 0) printf("."); printf("%d", ((unsigned char *)(he->h_addr_list[0]))[i]); }; printf("\n"); }; }; }; return 0; }; -- Opera-Linux: https://list.opera.com/mailman/listinfo/opera-linux More lists: https://list.opera.com/mailman/listinfo/ Unsubscribe: mailto:[email protected]?subject=unsubscribe