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


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

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

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

--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2011-07-16 05:42:43 UTC ---
Further investigation showed that this is most likely an application (Java NIO
actually) bug.

It appears that NIO, under some conditions, may execute the following sequence
of calls:

1. accept(...) = N
2. close(N)
3. dup2(X, N) = N

which opens a race: if between 2 and 3 another thread opens N (e.g. a NETLINK
socket), that thread will lose.

In our case, the victim happened to be DNS resolver thread.

Since there is nothing glibc can really do to protect itself from such
application code, resolving as invalid.

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


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