Hi folks, As was mentioned in the Squeak Board minutes, I've been working on getting Squeak running on SmartOS. (SmartOS is a newish distribution of Illumos, which is a fork of OpenSolaris, which is apparently no longer open, now that Oracle owns it. Anyway, it's a flavour of Solaris.) Attached is a patch that lets me build the VM and open an image in a SmartOS zone. I ran into a few issues, which I'll detail below: 1) I tried to do a proper autoconf check for the existence of headers such as <sys/sockio.h> and <sys/ucontext.h>, but I ran afoul of very strange behaviour from the libtool script that my regenerated configure script created. (Geez, how many levels of code generation do these GNU guys think is healthy?) I was able to create the config.h file that I wanted, but then linking didn't work anymore. For now I've just used the __sun__ preprocessor definition (apparently automatically defined by the compiler) for conditional compilation. 2) It looks like the image runs ok, but when I try to connect a VNC client (SmartOS has no GUI), the VM receives a SIGPOLL/SIGIO signal and exits. Fixing that probably requires more significant changes than I've made so far, so if anybody has suggestions on how to tackle it, I'd love to hear them. If there's some other method of submitting the patch that would be more convenient of the maintainers, I'm happy to do that instead. Colin solaris.patch (3K) Download Attachment |
On Fri, May 4, 2012 at 4:04 PM, Colin Putney <[hidden email]> wrote:
You at least need to establish a signal handler for SIGIO (should be done in platforms/unix/vm/aio.c). Or it could be that the signal handler is one-shot, and on the second SIGPOLL/SIGIO the VM quits. You need the signal handler for sigaction to not be one-shot, which you'd control by using sigaction instead of the simple signal in aio.c. check the manual page for signal and sigaction and see what they say about SA_RESETHAND.
A tar of the changed files as well as patch is as good as it gets I think. Ta!
best, Eliot |
In reply to this post by Colin Putney-3
Am 05.05.2012 um 01:04 schrieb Colin Putney: > Hi folks, > > As was mentioned in the Squeak Board minutes, I've been working on > getting Squeak running on SmartOS. (SmartOS is a newish distribution > of Illumos, which is a fork of OpenSolaris, which is apparently no > longer open, now that Oracle owns it. Anyway, it's a flavour of > Solaris.) > > Attached is a patch that lets me build the VM and open an image in a > SmartOS zone. > > I ran into a few issues, which I'll detail below: > > 1) I tried to do a proper autoconf check for the existence of headers > such as <sys/sockio.h> and <sys/ucontext.h>, but I ran afoul of very > strange behaviour from the libtool script that my regenerated > configure script created. (Geez, how many levels of code generation do > these GNU guys think is healthy?) I was able to create the config.h > file that I wanted, but then linking didn't work anymore. For now I've > just used the __sun__ preprocessor definition (apparently > automatically defined by the compiler) for conditional compilation. > > 2) It looks like the image runs ok, but when I try to connect a VNC > client (SmartOS has no GUI), the VM receives a SIGPOLL/SIGIO signal > and exits. Fixing that probably requires more significant changes than > I've made so far, so if anybody has suggestions on how to tackle it, > I'd love to hear them. > > If there's some other method of submitting the patch that would be > more convenient of the maintainers, I'm happy to do that instead. > > Colin > <solaris.patch> Regards, Andreas smime.p7s (6K) Download Attachment |
> Maybe this has something to do with what I found out a few years ago: > http://forum.world.st/Squeak-3-9-8-VM-problem-td105550.html Hi Andeas, that's exactly the issue I ran into; I'll try your fix. Thanks! Colin |
On Sat, May 5, 2012 at 8:28 AM, Colin Putney <[hidden email]> wrote:
and Colin, the solution is #define signal(a, b) sigset(a, b). From http://www.linuxmisc.com/3-linux/56c371addec84c45.htm
"It's amazing that there is so much misunderstanding about this. If you want the old SunOS4.1 semantics of "signal", use "sigset" in your Solaris 2.x programs.
i.e. sigset(SIGTERM, my_catch_it_fn); This works just as "signal" used to in SunOX4.1. Signal will be caught "reliably", i.e. new instances will be held until the current when is
completely handled, i.e. until the handler function finishes. At that point, the hadnler will be automatically reinstalled. If you are porting a SunOS4.1 program with 80,000 "signal" calls, just
#define signal(a, b) sigset(a, b) Do NOT use "signal" in Solaris 2.x. Even if you reinstall the handler within the hadnler itself, it is possible to receive two signals in such quick
succession that you're program gets blown away before your handler is reinstalled. Phew! By the way, this has been in SysV since 1987-ish. Solaris 2.x is SysV. NOW, if you want "fancier", signal handling, you can use the sigaction /
sigsetmask stuff instead. Here you can automatically hold a whole set of signals immediately upon receiving a single one. Marc Rossner Taos Mountain Software" best, Eliot |
On Sat, May 5, 2012 at 8:58 AM, Eliot Miranda <[hidden email]> wrote: > and Colin, the solution is #define signal(a, b) sigset(a, b). From http://www.linuxmisc.com/3-linux/56c371addec84c45.htm Cool! Thanks. Here's the revised patch, with a tarball of the changed files. It does solve the signalling problem, but I still can't get a VNC connection to work. I'll continue debugging and post further patches as I uncover issues. Colin |
Thanks, Colin. have you considered moving the sigset define into platforms/unix/vm/sqPlatformSpecific.h? I suspect there are uses of signal in UnixOSProcessPlugin that could benefit (SIGCHLD comes to mind).
On Mon, May 7, 2012 at 7:17 PM, Colin Putney <[hidden email]> wrote:
best, Eliot |
On Tue, May 8, 2012 at 9:36 AM, Eliot Miranda <[hidden email]> wrote: > > Thanks, Colin. have you considered moving the sigset define into platforms/unix/vm/sqPlatformSpecific.h? I suspect there are uses of signal in UnixOSProcessPlugin that could benefit (SIGCHLD comes to mind). I did think about that, but didn't see anything that was obviously the right place. I'll try it and include it in a future patch if it works out. Colin |
Free forum by Nabble | Edit this page |