[Vm-dev] unix SqueakSource socket 'too many open files' problem

David T. Lewis lewis at mail.msen.com
Thu Feb 25 23:17:14 UTC 2021

On Thu, Feb 25, 2021 at 01:47:16PM -0800, tim Rowledge wrote:
> Thanks Dave - 
> that's all rather scary sounding.

Scary, no. But hard to debug? Yes.  A file and/or socket handle leak
just means that the image is failing to close connections properly,
possibly because of some completely unrelated error that was not
handled by closing the socket.

> It seems really weird that this has only just started and yet the system has been running happily for over a year. It's a 'PersonalSqueakSource' image built on a very late 5.2 /5.3 alpha image.
> Are there unix system settings for allowable numbers of sockets etc that might have been changed by a sysadmin? Anything like that?

Yes I'm sure it's configurable, but it's highly unlikely that a
sysadmin would bother to fool around with something like that.
I think the default is 1000 open file descriptors (including
sockets, pipes, files) per process, and that is way more than
you need for a squeaksource server.

Assuming you have access to the server, the best place to start
is by looking in the directory /proc/<pid>/fd/* (where <pid> is
the process ID of the Squeak VM (you can find it with something
like "$ ps -aef | grep squeak"). If you look at that once a day
for a week, you will be able to see a growing number of file
descriptors hanging around. Eventually it gets to be too many,
and bad things happen.

If you do /not/ see these file descriptors accumulating over
time, then it would indicate some other kind of issue entirely.

Good luck and keep us posted.


More information about the Vm-dev mailing list