Package: libc6 Version: 2.3.5 When using nscd, calls to functions like getgrgid() may fail intermittently whent the reply is large. This is because the entire reply may not yet be ready for reading in glibc's nscd client when __poll() first indicates 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 attached patch adds calls to __poll() inside the loops in these two functions when errno is EAGAIN to correct the problem. I have also sent the patch to the glibc developer list. The bug is present in glibc versions 2.3.5, 2.3.6, and 2.4, and probably all the way back to the introduction of nscd.
nscd-client.patch.gz
Description: GNU Zip compressed data