cvs commit: src/sys/sys filedesc.h

Joerg Sonnenberger joerg at britannica.bec.de
Tue Jun 21 13:30:27 PDT 2005


On Tue, Jun 21, 2005 at 01:00:15PM -0700, Matthew Dillon wrote:
> 
> :On Tue, Jun 21, 2005 at 10:59:47AM -0700, Matthew Dillon wrote:
> :>   Bump fd_lastfile, freefile, and refcnt to 32 bit ints.  Also bump cmask
> :>   (though that doesn't fix any particular bug).  lastfile and freefile were
> :>   previously unsigned shorts which caused the system to become very confused
> :>   when any single user process had more then 65535 open file descriptors.
> :
> :I don't think it can happen with a single process having 64k open file
> :descriptors. It should hit resource limits much earlier. But it is
> :certainly possible for multiple processes to reach this limit. On the
> :other hand, that makes error handling kind of difficult, since e.g.
> :fork() should be able to trigger it.
> :
> :Joerg
> 
>     This can happen trivially because Jeff sent me a program that blows
>     the kernel up.  Resource limits are not hard-limited to 65535 so there
>     is nothing preventing you from bumping them up.

But kern.maxfilesperproc is an upper limit on the number of descriptors?
If not, that's a bigger bug.

Joerg





More information about the Commits mailing list