Bug#413450: libc6: svc_getreqset doesn't work on 64bit hosts
Package: libc6
Version: 2.3.6.ds1-13
Severity: normal
Tags: patch
On 64bit machines, svc_getreqset ignores filedescriptors 32-63 and others.
This has been fixed in glibc 2.4 but needs to be
fixed in 2.3.6.debian while we keep using it.
The consequence of this bug is that if mountd (or any other rpc server)
gets 26 or more concurrent tcp connections, it goes into a spin constantly
using CPU, and not servicing requests on those connections.
Following patch fixes it.
Thanks,
NeilBrown
### Diffstat output
./sunrpc/svc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff .prev/sunrpc/svc.c ./sunrpc/svc.c
--- .prev/sunrpc/svc.c 2007-03-05 14:50:06.000000000 +1100
+++ ./sunrpc/svc.c 2007-03-05 14:50:44.000000000 +1100
@@ -372,7 +372,7 @@ svc_getreqset (fd_set *readfds)
setsize = FD_SETSIZE;
maskp = readfds->fds_bits;
for (sock = 0; sock < setsize; sock += NFDBITS)
- for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1)))
+ for (mask = *maskp++; (bit = ffsl (mask)); mask ^= (1L << (bit - 1)))
INTUSE(svc_getreq_common) (sock + bit - 1);
}
INTDEF (svc_getreqset)
-- System Information:
Debian Release: 4.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Versions of packages libc6 depends on:
ii tzdata 2007b-1 Time Zone and Daylight Saving Time
libc6 recommends no packages.
-- no debconf information
Reply to: