I've been running a squeaksource system on a 64bit linux server for a year or so and just started having odd problems.
Talking with Chris about it, and looking into the assorted logs, lead to the theory that sometihng (unknown and I can't see how possible) caused the image to save and quit at some point when the expected behaviour is to *not* ever save. That lead to some complaints about Magma related details that don't matter here.
I had much fun (the usual linux user names/permissions stuff) but eventually got a new copy of the squeaksource image running. Yay!
Except after an indeterminate time (several hours, not a whole day) the webpage part of the sytem became unaccessible even though it had not actually crashed out. The log contained a bunch of lines like this -
3729ab18e70dac 2021-02-24T23:37:53.41687-05:00 CurrentEnvironment:
@40000000603729ab18e71d4c 2acceptHandler: Too many open files
@4000000060379f1127814ddc acceptHandler: aborting server 12 pss=0x14df900
@4000000060379f112782dc4c socketStatus: freeing invalidated pss=0x14df900
@400000006037b1ef0d99c214 acceptHandler: Too many open files
@400000006037b1ef0d9a5e54 acceptHandler: aborting server 12 pss=0x7f2f8c8d4630
@400000006037b1ef0d9c7194 socketStatus: freeing invalidated pss=0x7f2f8c8d4630
... which are errors from the VM socket handlers.
I've not seen this happening before that I recall. Any ideas? Stuff to check? Solutions?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: TDB: Transfer and Drop Bits
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 15fdeaa142257eeb6bff3b41014f2f407420a70d
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/15fdeaa142257eeb6b…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2021-03-01 (Mon, 01 Mar 2021)
Changed paths:
M build.macos32x86/common/Makefile.rules
M build.macos64ARMv8/common/Makefile.rules
M build.macos64x64/common/Makefile.rules
Log Message:
-----------
Update from c++11 to c++14 on MacOS builds. Affects only Bochs simulators
and Terf plugins, hence [ci skip]
-----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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJgPO/GAAoJEAwpOKXMq1MaCUUIAK0d//me/vV4uuICELaOnxEs
zCqHtdb/8J8lI4GhvBW/oniSanyduFyzCxe7powS+5m4L/ons7U/2wmQXS2w3Vcy
gY9pbXm4m5v9xIBUC0oD/REqhTo0epeem8Q/2GN6bvHPBjTt+BWVh3Z42l6HN/TB
LXFfnXPck5buU2Lzo27brXE2XAweZx2JKdjhxB+YGOzsiwjWECqiy+zDXwXi2uN7
KG2ijFdQ6QTd5TaeQWgLhpFT/gnGX1ss8KPlkeKdcE7SH+EM0zPiie50bulUaJ7Q
viLM3pT7+K5U9NZ7FXbkhACg4MR8MPz0llHC4zUznqwiaNv2XEwf4Tk+Zy+rnhs=
=7R9P
-----END PGP SIGNATURE-----
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: a69b4c93edbbde759c849aa8e2f9adc97e808694
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/a69b4c93edbbde759c…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2021-02-28 (Sun, 28 Feb 2021)
Changed paths:
M platforms/win32/plugins/CameraPlugin/winCameraOps.cpp
M platforms/win32/plugins/SoundPlugin/sqWin32Sound.c
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
On Windows allow a zero width in openCamera to select the largest frame size
available. Get rid of an annoying print of the WM_DEVICECHANGE message
(DPRINTF is a misnomer). Update sound devices on next access after a
WM_DEVICECHANGE message.