By a curious coincidence, the night before Steve sent his comment about
poplog sockets I received the following request for help from
Matthias Scheutz <mscheutz@cse.nd.edu>
and
Paul Schermerhorn <pscherm1@cse.nd.edu>
at the Department of Computer Science and Engineering
University of Notre Dame
http://www.nd.edu/~airolab/
where Matthias has been using pop11 for teaching and research. His
simworld package, used for evolutionary A-life experiments is
implemented using the rclib and simagent extensions to Pop-11.
Because the experiences are very cpu-consuming he has been using a
distributed environment, using sockets. (Brian Logan at Nottingham
University has also been distributing Sim_agent, but in a different way,
using HLA).
Matthias and Paul have had problems which appear to result in a shortage
of sockets, even though they use sysclose explicitly and try to make
sure that device records are garbage collected by assigning false to the
relevant variables and data-structure fields.
Does anyone have any idea what's going on? Here's the message
forwarded with permission from Matthias.
I've looked at $popsrc/miscio.p and as far as I can see the error
message must be a result of
_file_tab_next_free
not being updated properly when the sockets are closed.
This should be handled by
Close_filetab_files(false);
which is not directly called by sysclose but, as far as I can tell,
only when a garbage collection occurs. That should happen when one
attempts to create a new device.
I am wondering whether the problem could be that the initial size
of the descriptor table may be too small for some applications.
$popsrc/miscio.p has this initialisation:
_file_tab_limit = _file_tab@(w)[_256],
Would it be safe to recommend him to try increasing that limit, or is
there some operating system limit that that has to match? Does anyone
know?
If you have any thoughts, please copy to Matthias and Paul.
I'll pass on to them the correspondence from Steve and Roger about
sockets, though Steve's problem is different.
>From mscheutz@cse.nd.edu Mon Jan 13 14:42:05 2003
Return-path: <mscheutz@cse.nd.edu>
Date: Mon, 13 Jan 2003 09:42:20 -0500 (EST)
From: Matthias Scheutz <mscheutz@cse.nd.edu>
To: Aaron Sloman <A.Sloman@cs.bham.ac.uk>
Subject: pop and file descriptors
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Aaron,
We have repeatedly come across the following kind of MISHAP:
;;; MISHAP - CAN'T CREATE DEVICE - DEVICE TABLE IS FULL
;;; FILE : /afs/nd.edu/user40/airolab/projects/simworld40/beta/swserver.p
;;; LINE NUMBER: 2504
;;; DOING : Sys_cons_device pipein updatehost(simhost) runproc run_threads
;;; start_thread setup collection_basic05 trycompile
It seems that POPLOG does not return file descriptors it requested even
though they are not in use any longer. In particular, the experimentation
server I wrote repeatedly accepts socket connections from clients, and
closes them when clients finish. However, after a while, i.e., after lots
of clients have connected to the server, we get the above problem--do you
have any thoughts how to avoid this? I put sysgarbage calls in, I
explicitly set unused sockets to false so as to get rid of the device,
etc. but that does not seem to have any effect. Is it possible that there
is a problem with POPLOG and device descriptors, i.e., that pop does not
return them? Thanks.
Best,
Matthias
--
Paul W. Schermerhorn
Computer Science and Engineering
University of Notre Dame
pscherm1@cse.nd.edu
|