Path: utzoo!utstat!news-server.csri.toronto.edu!math.lsa.umich.edu!caen!sdd.hp.com!wuarchive!uunet!mcsun!unido!tub!net From: net@tub.UUCP (Oliver Laumann) Newsgroups: news.software.nntp Subject: Too-many-open-files bug in NNTP 1.5.10 server fixed Message-ID: <1802@tub.UUCP> Date: 15 Oct 90 10:53:00 GMT Reply-To: net@tub.UUCP (Oliver Laumann) Organization: Technical University of Berlin, Germany Lines: 20 I think I've found the bug that causes the NNTP 1.5.10 server to get into a mode where it prints "spawn: pipe: Too many open files" for every incoming article. The culprit is the call to vfork() followed by a call to closelog() in the child process in server/spawn.c. closelog() not only closes the file descriptor used by syslog(), but also sets (or clears; I don't have the sources) a variable shared between closelog and syslog to indicate that the socket must be re-opened in the next call to syslog(). Since spawn.c uses vfork() instead of fork(), this variable is also set or cleared in the parent process, so that the next call to syslog() re-opens the socket, although it has only been closed in the child process. This is repeated until all available file descriptors are in use. I don't know an easy fix for this other than replacing vfork by fork. Regards, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP