[Bug network/24047] New: libresolv should use IP_RECVERR to avoid long timeouts

sourceware at isomer dot meta.net.nz sourceware-bugzilla@sourceware.org
Mon Dec 31 02:52:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=24047

            Bug ID: 24047
           Summary: libresolv should use IP_RECVERR to avoid long timeouts
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: network
          Assignee: unassigned at sourceware dot org
          Reporter: sourceware at isomer dot meta.net.nz
  Target Milestone: ---

When performing DNS lookups over UDP, resolv currently does not listen for
async socket errors indicating the DNS lookup has failed, and instead waits for
a full timeout before trying again/giving up.

resolv should instead use IP_RECVERR to listen for asynchronous errors (eg
destination host/net/port unreachable), and immediately retry, or give up on
the nameserver (depending on the type of error) if an error is indicated. 

This would be similar to how glibc already handles UDP errors in the sunrpc
code.

Some common, example situations where this would significantly help:
 - networking failed to start, and processes are blocking on startup waiting
for a DNS resolution.
 - one nameserver is responding with port unreachable, while the other listed
nameserver in /etc/resolv.conf is available.

In both situations, an avoidable 15s delay can be skipped.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list