public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "foom at fuhm dot net" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12350] New: Resolver doesn't save RES_SNGLKUP/RES_SNGLKUPREOP state in getaddrinfo Date: Mon, 27 Dec 2010 21:31:00 -0000 [thread overview] Message-ID: <bug-12350-131@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=12350 Summary: Resolver doesn't save RES_SNGLKUP/RES_SNGLKUPREOP state in getaddrinfo Product: glibc Version: 2.12 Status: NEW Severity: normal Priority: P2 Component: libc AssignedTo: drepper.fsp@gmail.com ReportedBy: foom@fuhm.net If you have a broken nameserver which can't deal with multiple requests sent at the same time (like I have just now discovered that I do after upgrading glibc: a broken load balancer actually), then glibc attempts to work around the problem with the single-lookup and single-lookup-reopen code (thanks!). Unfortunately, the way the fallback is working, every single time a dns query is made, it has a 5 second timeout before it tries the fallback single-lookup mode. It looks like the code is attempting to save the fact that you have a broken resolver so that only the first name resolution in a process is delayed by 5 seconds. In resolv/res_send.c:send_dg: statp->options |= RES_SNGLKUP; Unfortunately, that modification of options is defeated by the code in sysdeps/posix/getaddrinfo.c:gaih_inet that surrounds the (eventual) call to send_dg: old_res_options = _res.options; _res.options &= ~RES_USE_INET6; [...] _res.options = old_res_options; So, the modification to the resolver parameters only takes effect during a single call to getaddrinfo. Perhaps the code in gaih_inet should save/restore only the RES_USE_INET6 flag, and not the entirety of options? On the other hand, it might not be the best idea to permanently set the RES_SNGLKUP flag just by ever having lost a single dns packet during the time an app has been running (when talking to a working nameserver), even if the code was originally intended to. So maybe it'd be better to simply remove the modification of statp->options entirely? Certainly I hope to have my nameserver setup fixed sooner rather than later, so this bug is more of an "FYI" than something that I'd ever use the fix for. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2010-12-27 17:50 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-27 21:31 foom at fuhm dot net [this message] 2011-05-30 3:53 ` [Bug libc/12350] " drepper.fsp at gmail dot com 2014-06-27 14:04 ` fweimer at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-12350-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).