This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12926] getaddrinfo()/make_request() may spin forever


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

James E. King, III <jim.king at simplivity dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |jim.king at simplivity dot com
            Version|unspecified                 |2.15
         Resolution|INVALID                     |---

--- Comment #3 from James E. King, III <jim.king at simplivity dot com> ---
I recently discovered root cause of an issue I was investigating to the same
root cause described in Paul's original report below.  Regardless of whether
the application is behaving correctly, the documentation for recvmsg clearly
states:

--

RETURN VALUE
  These calls return the number of bytes received, or -1 if an error occurred.
  The return value will be 0 when the peer has performed an orderly shutdown.

--

It would make sense that once one received zero as a result, subsequent calls
would also return zero, and that is exactly what was reported - an infinite
loop.  A fix was provided that appears correct however the defect was closed as
invalid.  I'd like to request this be re-opened and the fix proposed be
implemented.  

There are potentially more reasons than what was suggested in post number two
as to why zero could be returned.  There is evidence in other net posts that
changing the networking configuration of the system (administrative or
automatically) during the operation could cause this.

This code defect exists at least in eglibc-2.15 through eglibc-2.19.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]