public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
@ 2015-04-20  7:28 ` fweimer at redhat dot com
  2015-05-15 20:37 ` fweimer at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2015-04-20  7:28 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
              Flags|                            |security-

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
  2015-04-20  7:28 ` [Bug libc/984] Respond to changed resolv.conf in gethostbyname fweimer at redhat dot com
@ 2015-05-15 20:37 ` fweimer at redhat dot com
  2015-06-04 20:37 ` karl at thefrenches dot us
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ 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=984

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthias.andree at gmx dot de

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
*** Bug 3675 has been marked as a duplicate of this bug. ***

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
  2015-04-20  7:28 ` [Bug libc/984] Respond to changed resolv.conf in gethostbyname fweimer at redhat dot com
  2015-05-15 20:37 ` fweimer at redhat dot com
@ 2015-06-04 20:37 ` karl at thefrenches dot us
  2015-06-04 20:57 ` fweimer at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: karl at thefrenches dot us @ 2015-06-04 20:37 UTC (permalink / raw)
  To: glibc-bugs

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

karl at thefrenches dot us changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |karl at thefrenches dot us
         Resolution|WONTFIX                     |---

--- Comment #5 from karl at thefrenches dot us ---
nscd does not resolve the resolver issue.

I have verified with sendmail.  Sendmail caches the resolver information and
will not accept updates, even with nscd running.  I have verified it will still
attempt to communicate with the old name severs after updating the resolv.conf.

Another issue with the nscd solution is that it interferes with freeipa/IDM as
they require sssd and all referenced documentation states not to have nscd
intalled/running with sssd.

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-06-04 20:37 ` karl at thefrenches dot us
@ 2015-06-04 20:57 ` fweimer at redhat dot com
  2015-06-04 23:50 ` carlos at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2015-06-04 20:57 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Karl from comment #5)
> nscd does not resolve the resolver issue.
> 
> I have verified with sendmail.  Sendmail caches the resolver information and
> will not accept updates, even with nscd running.  I have verified it will
> still attempt to communicate with the old name severs after updating the
> resolv.conf.

Indeed, this is a very good point.  Thanks.

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-06-04 20:57 ` fweimer at redhat dot com
@ 2015-06-04 23:50 ` carlos at redhat dot com
  2015-06-05  7:18 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: carlos at redhat dot com @ 2015-06-04 23:50 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #7 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Karl from comment #5)
> nscd does not resolve the resolver issue.
> 
> I have verified with sendmail.  Sendmail caches the resolver information and
> will not accept updates, even with nscd running.  I have verified it will
> still attempt to communicate with the old name severs after updating the
> resolv.conf.

How is that a problem in glibc if sendmail caches the resolver? Or are you
saying something else? That libc.so.6 caches the resolvers and fails to call
out to nscd? That would be a real bug, and we'd like to see some kind of
reproducer for that if possible, so we can fix the issue.

> Another issue with the nscd solution is that it interferes with freeipa/IDM
> as they require sssd and all referenced documentation states not to have
> nscd intalled/running with sssd.

This documentation is wrong. I have worked closely with the SSSD team at Red
Hat and I can get more concrete evidence to prove this if we need to. You can
run SSSD with NSCD without any problem. Can you provide a reference to the
documentation so I can talk to the SSSD team about this?

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2015-06-04 23:50 ` carlos at redhat dot com
@ 2015-06-05  7:18 ` fweimer at redhat dot com
  2015-06-05 13:04 ` carlos at redhat dot com
  2015-08-24  9:43 ` [Bug network/984] " jsm28 at gcc dot gnu.org
  7 siblings, 0 replies; 11+ messages in thread
From: fweimer at redhat dot com @ 2015-06-05  7:18 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Carlos O'Donell from comment #7)

> How is that a problem in glibc if sendmail caches the resolver? Or are you
> saying something else? That libc.so.6 caches the resolvers and fails to call
> out to nscd? That would be a real bug, and we'd like to see some kind of
> reproducer for that if possible, so we can fix the issue.

sendmail needs to do MX lookups, so it uses res_query (and res_search,
depending on the context) and not one of the getaddrinfo/get*by* functions. 
It's also a forking daemon.  It initializes the glibc resolver before forking,
and I assume all the child processes inherit the cached list of name servers.

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2015-06-05  7:18 ` fweimer at redhat dot com
@ 2015-06-05 13:04 ` carlos at redhat dot com
  2015-08-24  9:43 ` [Bug network/984] " jsm28 at gcc dot gnu.org
  7 siblings, 0 replies; 11+ messages in thread
From: carlos at redhat dot com @ 2015-06-05 13:04 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #9 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #8)
> (In reply to Carlos O'Donell from comment #7)
> 
> > How is that a problem in glibc if sendmail caches the resolver? Or are you
> > saying something else? That libc.so.6 caches the resolvers and fails to call
> > out to nscd? That would be a real bug, and we'd like to see some kind of
> > reproducer for that if possible, so we can fix the issue.
> 
> sendmail needs to do MX lookups, so it uses res_query (and res_search,
> depending on the context) and not one of the getaddrinfo/get*by* functions. 
> It's also a forking daemon.  It initializes the glibc resolver before
> forking, and I assume all the child processes inherit the cached list of
> name servers.

Correct, the res_* functions are designed specifically to talk directly to
Internet domain name servers, and as such bypass nscd and sssd.

You are also correct, that once you initialize the resolver state the state is
static, this is all well known. All children and threads will have the same
resolver state if created after initialization.

It is also well known that calling res_init() again will cause any underlying
configuration files to be reloaded (atomic increment of __res_initstamp does
this).

Therefore the bug is entirely in sendmail. If you use this API you must have a
side-channel to notify the application that it should call res_init again. This
is a push process. For example it might be with systemd integration that you
discover the network has changed and call res_init() again.

There have been patches floated that add stat() calls to *all* of the res_*
functions, but the performance implications of that change have never been
analyzed and that's why the patch keeps getting rejected. Is it within the
noise to do stat() on /etc/resolv.conf to reload the resolvers if they change?
It seems a heavy handed approach for systems which are less dynamic and have
more stable configurations. At first blush it seems the stat has to be less
costly than the upcoming network traffice, but it's still a non-zero cost paid
in the hot-path of all these functions.

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


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

* [Bug network/984] Respond to changed resolv.conf in gethostbyname
       [not found] <bug-984-131@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-06-05 13:04 ` carlos at redhat dot com
@ 2015-08-24  9:43 ` jsm28 at gcc dot gnu.org
  7 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-08-24  9:43 UTC (permalink / raw)
  To: glibc-bugs

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

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philipp@redfish-solutions.c
                   |                            |om

--- Comment #10 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
*** Bug 18279 has been marked as a duplicate of this bug. ***

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


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

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
  2005-05-31 14:37 [Bug libc/984] New: " Martin dot vGagern at gmx dot net
  2005-05-31 14:40 ` [Bug libc/984] " jakub at redhat dot com
  2006-02-07  7:57 ` dearvoid at 263 dot net
@ 2006-04-25 17:59 ` drepper at redhat dot com
  2 siblings, 0 replies; 11+ messages in thread
From: drepper at redhat dot com @ 2006-04-25 17:59 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-04-25 17:59 -------
Use nscd.  There will be no support for this is libc routines themselves.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX


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

------- 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] 11+ messages in thread

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
  2005-05-31 14:37 [Bug libc/984] New: " Martin dot vGagern at gmx dot net
  2005-05-31 14:40 ` [Bug libc/984] " jakub at redhat dot com
@ 2006-02-07  7:57 ` dearvoid at 263 dot net
  2006-04-25 17:59 ` drepper at redhat dot com
  2 siblings, 0 replies; 11+ messages in thread
From: dearvoid at 263 dot net @ 2006-02-07  7:57 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From dearvoid at 263 dot net  2006-02-07 07:56 -------
I met the same problem. Is there any way to let gethostbyname() reread
'/etc/resolv.conf'?

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


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

------- 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] 11+ messages in thread

* [Bug libc/984] Respond to changed resolv.conf in gethostbyname
  2005-05-31 14:37 [Bug libc/984] New: " Martin dot vGagern at gmx dot net
@ 2005-05-31 14:40 ` jakub at redhat dot com
  2006-02-07  7:57 ` dearvoid at 263 dot net
  2006-04-25 17:59 ` drepper at redhat dot com
  2 siblings, 0 replies; 11+ messages in thread
From: jakub at redhat dot com @ 2005-05-31 14:40 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2005-05-31 14:40 -------
There is a solution, already implemented.
Use nscd and nscd -i hosts in the script that rewrites your resolv.conf
(or nsswitch.conf etc.).

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


http://sources.redhat.com/bugzilla/show_bug.cgi?id=984

------- 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] 11+ messages in thread

end of thread, other threads:[~2015-08-24  9:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-984-131@http.sourceware.org/bugzilla/>
2015-04-20  7:28 ` [Bug libc/984] Respond to changed resolv.conf in gethostbyname fweimer at redhat dot com
2015-05-15 20:37 ` fweimer at redhat dot com
2015-06-04 20:37 ` karl at thefrenches dot us
2015-06-04 20:57 ` fweimer at redhat dot com
2015-06-04 23:50 ` carlos at redhat dot com
2015-06-05  7:18 ` fweimer at redhat dot com
2015-06-05 13:04 ` carlos at redhat dot com
2015-08-24  9:43 ` [Bug network/984] " jsm28 at gcc dot gnu.org
2005-05-31 14:37 [Bug libc/984] New: " Martin dot vGagern at gmx dot net
2005-05-31 14:40 ` [Bug libc/984] " jakub at redhat dot com
2006-02-07  7:57 ` dearvoid at 263 dot net
2006-04-25 17:59 ` drepper 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).