VM freeze and crash when saving

David T. Lewis lewis at mail.msen.com
Thu Apr 5 19:45:09 UTC 2007


On Thu, Apr 05, 2007 at 05:24:39PM +0200, Florian Minjat wrote:
> David T. Lewis wrote:
> >Florian,
> >
> >I cannot help with the actual problem you are having, but I can
> >suggest a workaround to prevent the production image getting hung.
> >If you do your saves in a forked background image, the production
> >image should keep running even if the background image hangs. You
> >will still need to monitor the system and kill the hung images
> >when it happens, but at least the production image could keep
> >running. Actually, you could have the production image keep track
> >of the forked image, and terminate it after a minute or so if it
> >has not yet exited; that way you would not need to monitor it
> >manually.
> >
> >See UnixProcess class>>saveImageInBackground:nice: for an example
> >of how to do it. This is in OSProcess (on SqueakMap).
> >
> >HTH,
> >Dave
> 
> I tried to do a 'UnixProcess saveBackgroundImageNicely' on my prod 
> server, but nothing append. It returned an instance of UnixProcess 
> with pid of -1 which is weird.
> Am I missing something ?

Florian,

I am away from my Squeak computer now so I can't check any
actual code, but it probably means that the actual unix fork()
failed for some reason and gave an error return value of -1
rather than the pid of the forked process. Look at the unix
man page for fork (man 2 fork) for an explanation. Perhaps
there is some memory usage restriction on your unix account
that prevents you from starting a second copy of Squeak, but
I'm just guessing.

I can't remember the method name, but if you look in class
UnixOSProcessAccessor you will probably find a method for
retrieving the most recent value of errno. If you call this
immediately after the fork, you can probably see the errno
value that would explain the problem (but be warned that
the value of errno can up updated by any system call, so
it's possible you will get a misleading result). If the
method is #primErrno, then you would call it with
"OSProcess accessor primErrno" (but I don't remember
what I actually called it).

Most likely this will just turn out to be a restriction of
your ISP, sorry.

Dave




More information about the Squeak-dev mailing list