public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12224] New: getaddrinfo() fails permanently when no network on first call.
@ 2010-11-17 19:00 jim.duchek at gmail dot com
  2010-11-17 19:01 ` [Bug libc/12224] " jim.duchek at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jim.duchek at gmail dot com @ 2010-11-17 19:00 UTC (permalink / raw)
  To: glibc-bugs

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

           Summary: getaddrinfo() fails permanently when no network on
                    first call.
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: jim.duchek@gmail.com


Created attachment 5125
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5125
Repeated getaddrinfo call

When getaddrinfo() is called for the first time (on a per-thread basis) with no
network available, it returns -EAGAIN (which is probably an issue in and of
itself, as it's not necessarily a 'temporary problem).  Repeated calls to
getaddrinfo() will _always_ return -EAGAIN, even after network access is
restored.

If getaddrinfo() succeeds the first time, and then the network is removed, it
will fail (as expected), but will return to functional after the network is
restored.

It appears that despite having getaddrinfo() in permanent-fail mode on one
thread, spawning a new thread (assuming the network is up on first-call) will
have a functional getaddrinfo()

To reproduce (see attached short program): 

gcc -o getaddrinfo_test getaddrinfo_test.c
/etc/rc.d/network stop (or click the networkmanager icon, or whatever -- just
kill the network)
./getaddrinfo_test (will repeatedly show -3)

in another window, restart the network

the 'getaddrinfo_test' output will continue to output -3 indefinitely.


Any temporary workaround to 'reset' getaddrinfo() would be appreciated as well.
 I tracked this here from python -- it pretty much kills urllib2 if your
program is started before the network is up (say, on a laptop).  Filing this as
critical because it seems to break a number of applications that start on login
on a laptop (where the network doesn't come up until after login), as no amount
of 'retries' will help it work.

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


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

* [Bug libc/12224] getaddrinfo() fails permanently when no network on first call.
  2010-11-17 19:00 [Bug libc/12224] New: getaddrinfo() fails permanently when no network on first call jim.duchek at gmail dot com
@ 2010-11-17 19:01 ` jim.duchek at gmail dot com
  2011-01-16  0:01 ` drepper.fsp at gmail dot com
  2014-06-30  6:27 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jim.duchek at gmail dot com @ 2010-11-17 19:01 UTC (permalink / raw)
  To: glibc-bugs

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

Jim Duchek <jim.duchek at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jim.duchek at gmail dot com

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


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

* [Bug libc/12224] getaddrinfo() fails permanently when no network on first call.
  2010-11-17 19:00 [Bug libc/12224] New: getaddrinfo() fails permanently when no network on first call jim.duchek at gmail dot com
  2010-11-17 19:01 ` [Bug libc/12224] " jim.duchek at gmail dot com
@ 2011-01-16  0:01 ` drepper.fsp at gmail dot com
  2014-06-30  6:27 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: drepper.fsp at gmail dot com @ 2011-01-16  0:01 UTC (permalink / raw)
  To: glibc-bugs

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

Ulrich Drepper <drepper.fsp at gmail dot com> changed:

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

--- Comment #1 from Ulrich Drepper <drepper.fsp at gmail dot com> 2011-01-16 00:01:21 UTC ---
Your code has to call res_init() to get the new network configuration.

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


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

* [Bug libc/12224] getaddrinfo() fails permanently when no network on first call.
  2010-11-17 19:00 [Bug libc/12224] New: getaddrinfo() fails permanently when no network on first call jim.duchek at gmail dot com
  2010-11-17 19:01 ` [Bug libc/12224] " jim.duchek at gmail dot com
  2011-01-16  0:01 ` drepper.fsp at gmail dot com
@ 2014-06-30  6:27 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30  6:27 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
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:[~2014-06-30  6:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17 19:00 [Bug libc/12224] New: getaddrinfo() fails permanently when no network on first call jim.duchek at gmail dot com
2010-11-17 19:01 ` [Bug libc/12224] " jim.duchek at gmail dot com
2011-01-16  0:01 ` drepper.fsp at gmail dot com
2014-06-30  6:27 ` 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).