[squeak-dev] Lost image - any suggestions?

Levente Uzonyi leves at caesar.elte.hu
Fri Feb 22 00:16:36 UTC 2019


Hi Tim,

On Thu, 21 Feb 2019, Tim Johnson wrote:

> Hi,
>
> I have an image which had been running with only periodic interruption for 
> many months, as it functions as a server to collect data.  Over the past two 
> weeks or so, I'd started working on some code in it again, some of which I 
> liked, but which I'm afraid I may have now lost.  (I am foolish, working in 
> an image being used to collect data, but I have excuses.)
>
> Is it possible for me to recover anything from the last 2-3 weeks from a 
> .changes file?  I do have a previous version of the same image, from 
> November, but don't know how to load a different .changes file.

Yes. Open your previous version of the same image, open a File Browser in 
it, navigate to the changes file you want to recover changes from, select 
it and click on the "recent changes" button.

>
> In case it matters, here's what went down:
>
> Things seemed OK until today when I moved a window in Morphic and the VM 
> crashed.  (I had a dozen+ inspectors open on a dozen+ collections between 150 
> and 8000 in size.)
>
> After the crash, I loaded the image up again and recovered my one changed 
> method via Recover Changes.  Then, feeling  overconfident, I did a "save" 
> instead of "Save as" :(.  At some point during or after the save, Squeak 
> stopped responding to user input.  Activity Monitor showed CPU usage at only 
> around 3% so after a while I just force-quit it.

Do you happen to collect data via sockets? If yes, you'll want to increase 
the maximum number of external semaphores your image has. By default it 
has 256. Each socket uses 3 of those and each file uses one.
To increase the number to 8192, evaluate [ Smalltalk 
maxExternalSemaphores: 8192 ] before processing data; preferrably right 
after the image has started. You only have to do it once. If you save your 
image, it'll remember to use more external semaphores.

Levente

>
> Now if I try to load that image with the VM I'd been using, the VM crashes 
> before even bringing up a window.
>
> I got some output from running the VM through Terminal.  Thinking I'd get 
> more debug output, I tried it by compiling 
> oscogvm/build.macos64x64/squeak.cog.spur and running SqueakDebug.app, but I 
> was mistaken thinking SqueakDebug.app would dump any more to Terminal than 
> regular Squeak.app.  (Both output the same information and seem to crash in 
> the same way.)
>
> Anyhow, if anyone has any tips, or wants a copy of a broken image, please let 
> me know.  In any case, I'll just end with this quote from Ralph Johnson:
>
> "One thing to remember is NEVER TRUST AN IMAGE!  Images are extremely
> convenient and fairly fragile.  Every so often you will kill an image,
> and you will lose everything in it.  It is possible to recover from
> your changes log, but it is real pain if you have several weeks of
> work there to recover.  I make it a point to build a new image once
> a week or so.  Some people do it every day.  It all depends on your
> style, I guess.  Just because you saved an image doesn't mean that
> you can start it up again."
>
> - 
> https://users.cs.duke.edu/~ola/courses/cps196/spr98/smalltalk/changesets.html
>
> Thanks,
> Tim J
>
>


More information about the Squeak-dev mailing list