[Vm-dev] async I/O and networking on Solaris

stes stes at telenet.be
Wed Apr 1 15:59:46 UTC 2020

I noticed that Networking was working better in my Squeak4.6 image than in
Squeak5.3 on Solaris 11.
That is a polite way of saying that in my 5.3 vm the networking plugin
(socket plugin) was broken.

After debugging this, there is a "major" difference in the #include in the
subversion source code

r1550 | piumarta | 2006-10-10 19:12:28 +0200 (Tue, 10 Oct 2006) | 1 line
"try to use O_ASYNC then FASYNC then FIOASYNC, otherwise give up"

The subversion source code for squeak4.6 is doing an #include <sys/file.h>
which in my case defines FASYNC, so I think that for the 4.6 vm it uses
FASYNC fnctl to make a socket asynchronous.

On the other hand in the 5.3 "opensmalltalk" networking code I noticed that
it choosing FIOASYNC.

By grepping for the FIOASYNC I can see this with:

bash-4.4$ strings squeak  | grep ASYNC
ioctl(FIOASYNC, 1)
bash-4.4$ strings squeak  | grep SIOCSPGRP
ioctl(SIOCSPGRP, getpid())

So I think it is making the "wrong" (?) choice in Squeak5.3 for the Solaris
case .

I am no expert in this, so I'm not sure "wrong" is the right word, but it is
not consistent in any case with the 4.6 image.

I've recompiled with the #include <sys/file.h> included just as with the
Squeak4.6 source code,
and it is much better now also in Squeak 5.3

The networking code seems to work again (it was broken without that change).

For example from the Squeak menu if I choose in 5.3 now (with FASYNC)
"Update Squeak"

it connects to the source.squeak.org server and download the Squeak 6.0 and
that seems to work now.

Before it would report "Cannot connect to x.x.x.x." it would also print
messages like

sqConnectToPort: Interrupted system call

But the fix seems in the end very simple : just  #include <sys/file.h> in
the Solaris case ...

Sent from: http://forum.world.st/Squeak-VM-f104410.html

More information about the Vm-dev mailing list