bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NFS] more statd segfault, sunrpc/svc.c


From: michael
Subject: [NFS] more statd segfault, sunrpc/svc.c
Date: Fri, 12 Sep 2003 12:06:11 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624


--- Begin Message --- Subject: Re: [NFS] more statd segfault Date: Thu, 11 Sep 2003 19:05:23 -0700 User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 I finally tracked down the statd segfault that had been plaguing me for sometime.

statd calls sunrpc code which is in libc on debian. this code loops through all possible file descriptors and in my case if the number of fds per process is set higher then 8096 it segfaults.

for the archives here is the code that segfaults:

void
svc_getreqset (fd_set *readfds)
{
  register u_int32_t mask;
  register u_int32_t *maskp;
  register int setsize;
  register int sock;
  register int bit;

  setsize = _rpc_dtablesize ();
  maskp = (u_int32_t *) readfds->fds_bits;
  for (sock = 0; sock < setsize; sock += 32)
    for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1)))
      svc_getreq_common (sock + bit - 1);
}


keywords: statd segfault sun rpc file lock ulimit

michael



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  address@hidden
https://lists.sourceforge.net/lists/listinfo/nfs


--- End Message ---
--- Begin Message --- Subject: Re: [NFS] more statd segfault Date: Fri, 12 Sep 2003 16:39:16 +1000
On Thursday September 11, address@hidden wrote:
> I finally tracked down the statd segfault that had been plaguing me for 
> sometime.
> 
> statd calls sunrpc code which is in libc on debian. this code loops 
> through all possible file descriptors and in my case if the number of 
> fds per process is set higher then 8096 it segfaults.

Well done.
I have just applied a patch to statd and mountd in nfs-utils so that
it forces the fd limit down to FD_SETSIZE if it is above that.  This
appears to effectively work around what is really a libc bug (I
think).

Have you reported it to the glibc maintainers?

NeilBrown


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]