Patch-ID# 101145-01
Keywords: CTE5534, eintr, returns, open(), descriptor, consumes, sunos
Synopsis: SunOS 4.1.1;4.1.2;4.1.3: SunOS consumes all file descriptors when open() returns an EINTR
Date: Sep/10/93

SunOS Release: 4.1.1 4.1.2 4.1.3

Unbundled Product: 

Unbundled Release: 

Relevant Architectures: sparc
    NOTE: sun4, sun4c

BugId's fixed with this patch: 1131073

Changes incorporated in this version: 

Patches accumulated and obsoleted by this patch: 

Patches which conflict with this patch: 100338

Patches required with this patch: 

Obsoleted by: 

Files included with this patch: 

   spec_vnodeops.o

Problem Description: 

1131073
   Under SunOS 4.x it is possible that an open() system call can block and 
   while blocked if interrupted via a signal will return with a return value
   of -1 and an errno of EINTR.  So far, so good, this is what we'd expect.
   However, internally the operating system has consumed a file descriptor
   on behalf of the process.

   If the open is perfomed in a loop such that it is retried upon reciept
   of an EINTR error condition, eventually all available file descriptors 
   will be consumed and the open() will fail with an errno of EMFILE, "Too 
   many open files".  Note that the open() is returning -1 in each case,
   which is correct, but internally consumes one of the processes file
   descriptors, which is incorrect.  This has the effect of using up all
   of the file descriptors even though no files are really open.


Patch Installation Instructions: 

   Login as root

   mv /sys/`arch -k`/spec_vnodeops.o /sys/`arch -k`/spec_vnodeops.o.FCS

   cp `arch -k`/{4.1.1;4.1.2;4.1.3}/spec_vnodeops.o /sys/`arch -k`/spec_vnodeops.o

   You will then have to re-run config and make on your kernel.
   Please refer to the System and Network administration manual
   for information on building and installing a custom kernel.
