public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/3675] New: libc caches resolv.conf forever
@ 2006-12-07 14:38 matthias dot andree at gmx dot de
  2006-12-07 15:17 ` [Bug libc/3675] " drepper at redhat dot com
  2006-12-07 15:22 ` matthias dot andree at gmx dot de
  0 siblings, 2 replies; 4+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-12-07 14:38 UTC (permalink / raw)
  To: glibc-bugs

Relevant libc extension: BIND-8.2.3-T5B

libc apparently reads /etc/resolv.conf upon the first access to getaddrinfo()
and parses it and continues with the parsed results forever, even if
/etc/resolv.conf changes. There is no documented interface to cause libc to
re-read the resolv.conf file.

Real-world problem: Processes designed to run for many days will not detect
resolv.conf changes. On systems without permanent internet connection,
resolv.conf may be rewritten by unrelated DHCP client or PPP peer software after
an application using getaddrinfo() has started. The result is that errors such
as EAI_AGAIN that stem from stale /etc/resolv.conf parsed at application
start-up time persist until the application terminates.

Suggested solution: be sure to check /etc/resolv.conf for changes and, when
changes are detected, re-parse it every few (say, 5) seconds, or when EAI_AGAIN
would be returned. The time limit should bound the amount of time spent parsing
said fail without introducing too much delay WRT picking up changes.

Checking for resolv.conf changes upon EAI_AGAIN is clearly my favorite.

-- 
           Summary: libc caches resolv.conf forever
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: matthias dot andree at gmx dot de
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3675

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3675] libc caches resolv.conf forever
  2006-12-07 14:38 [Bug libc/3675] New: libc caches resolv.conf forever matthias dot andree at gmx dot de
@ 2006-12-07 15:17 ` drepper at redhat dot com
  2006-12-07 15:22 ` matthias dot andree at gmx dot de
  1 sibling, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2006-12-07 15:17 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-12-07 15:17 -------
That's what res_init() is for, call it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=3675

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3675] libc caches resolv.conf forever
  2006-12-07 14:38 [Bug libc/3675] New: libc caches resolv.conf forever matthias dot andree at gmx dot de
  2006-12-07 15:17 ` [Bug libc/3675] " drepper at redhat dot com
@ 2006-12-07 15:22 ` matthias dot andree at gmx dot de
  1 sibling, 0 replies; 4+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-12-07 15:22 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-12-07 15:22 -------
Thank you. Could you confirm that res_init() does:

- *not* look at the RES_INIT state (i. e. re-reads resolv.conf every time it is
called), and
- *not* leak memory when called frequently?


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3675

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/3675] libc caches resolv.conf forever
       [not found] <bug-3675-131@http.sourceware.org/bugzilla/>
@ 2015-05-15 20:37 ` fweimer at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2015-05-15 20:37 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
                 CC|                            |fweimer at redhat dot com
         Resolution|WORKSFORME                  |DUPLICATE

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
This was also reported as bug 984.

*** This bug has been marked as a duplicate of bug 984 ***

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-15 20:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 14:38 [Bug libc/3675] New: libc caches resolv.conf forever matthias dot andree at gmx dot de
2006-12-07 15:17 ` [Bug libc/3675] " drepper at redhat dot com
2006-12-07 15:22 ` matthias dot andree at gmx dot de
     [not found] <bug-3675-131@http.sourceware.org/bugzilla/>
2015-05-15 20:37 ` fweimer at redhat dot com

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).