This is the mail archive of the libc-alpha@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]

__readall() and __readvall() in nscd/nscd_helper.c


Hi all,

When nscd has a sufficiently large reply to a query (for instance a group
with many members), the entire reply may not yet be ready for reading in
the client when it first returns from __poll() indicating that the socket
is ready for reading. The functions __readall() and __readvall() in
nscd/nscd_helper.c expect that the entire reply can be read immediately,
since __poll() indicated that the socket was ready, but in reality this is
not always the case - nscd may need to get scheduled again before more
data will be available.

The effect of this problem is that when using nscd, calls to functions
like getgrgid() may fail intermittently when the reply is large. The
attached patch adds calls to __poll() inside the loops in these two
functions when errno is EAGAIN to correct the problem.

Mike Mammarella

Attachment: nscd-client.patch.gz
Description: GNU Zip compressed data


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