-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
One thing to check is also
ulimit -n
the numbber of open files that the shell reports.
You could change it with ulimit -n -S <n> where <n> is smaller than the current limit.
I'm not sure whether it matters for sockets.
But it may be the case that some software was installed on your machine that perhaps changed the profile, and that change the ulimit -n setting.
David Lewis wrote:
Tim, one other thing to look out for is the event handling in the VM. Since last October it now uses the Linux-specific epoll mechanism. If the problem you see now started happening after updating to a newer VM, then consider this as a possible suspect.
Linux epoll originated on Linux but there exist implementations on other Operating Systems it seems.
OpenIndiana has epoll and other facilities like Berkeley BSD kqueue.
https://illumos.org/man/5/epoll
When running the Squeak opensmalltalk configure script it says for me
$ grep HAVE_EPOLL config.h
#define HAVE_EPOLL 1 #define HAVE_EPOLL_PWAIT 1
So basically the configure script logic detects on OpenIndiana <sys/epoll.h> and enabled it.
This is because the ax_have_epoll.m4 M4 file from autoconf was used:
https://www.gnu.org/software/autoconf-archive/ax_have_epoll.html
If I configure ax_cv_have_epoll=no ax_cv_have_epoll_pwait=no
then
$ grep EPOLL config.h /* #undef HAVE_EPOLL */ /* #undef HAVE_EPOLL_PWAIT */
So basically when epoll support was introduced, it automatically switched on OpenIndiana to epoll.
So you could try as an experiment build the VM with
ax_cv_have_epoll=no ax_cv_have_epoll_pwait=no
The way to do that would be to edit the "mvm" script and add the above to the configure command line so that git diff reports something like:
- - CFLAGS="$OPT" + CFLAGS="$OPT"\ + ax_cv_have_epoll=no ax_cv_have_epoll_pwait=no
I am not sure whether it is the right way to disable epoll.
Perhaps a configure --without-epoll exists but I don't see it.
Also an issue is , how to see how the VM was built ?
In my case, by default on OpenIndiana epoll seems to be enabled now.
$ strings squeak | grep aioEnable aioEnable(%d, %p, %d): IGNORED aioEnable(%d): fd too large aioEnable: descriptor %d already enabled aioEnable(%d, %p, %d): allocating new epoll_event aioEnable: malloc event aioEnable(%d, %p, %d): allocating new epollEventData ... aioEnable(%d, %p, %d): enable non-blocking io and sigio
... but when I compile with ax_cv_have_epoll=no ax_cv_have_epoll_pwait=no
then
$ strings squeak | grep aioEnable aioEnable(%d, %p, %d): IGNORED aioEnable(%d): fd too large aioEnable: descriptor %d already enabled aioEnable(%d): external
To return to the Linux case, it could be a good experiment to build the VM without epoll if that is supported and see if it makes a difference, either by using the method described or by the recommended method to do it (as the method I describe may not be the correct one).
Finally as David T. Lewis also indicates the problem may have existed in the past before epoll, so there is of course not really an indication that epoll is involved here.
Basically as I read my interpretation of what David T. Lewis wrote is that file descriptor socket leaks have always been a problem - with/without epoll.
Regards, David Stes
vm-dev@lists.squeakfoundation.org