Lost image - any suggestions?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Lost image - any suggestions?

Tim Johnson-2
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.

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.

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




2-21-debug-out.txt (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lost image - any suggestions?

Paul DeBruicker
Hi Tim,

I've done this enough times that I think you can take a copy of your current
changes file & a new squeak image, move them to a separate directory, rename
the image file to match the changes file, then open the image file,  and see
all of your changes since the beginning of time with the "Recover changes"
command.  


Worth a shot at least.  






Tim Johnson-2 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.
>
> 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.
>
> 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
>
>
>
>
>
> 2-21-debug-out.txt (12K)
> <http://forum.world.st/attachment/5095840/0/2-21-debug-out.txt>





--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: Lost image - any suggestions?

timrowledge


> On 2019-02-21, at 4:04 PM, Paul DeBruicker <[hidden email]> wrote:
>
> Hi Tim,
>
> I've done this enough times that I think you can take a copy of your current
> changes file & a new squeak image, move them to a separate directory, rename
> the image file to match the changes file, then open the image file,  and see
> all of your changes since the beginning of time with the "Recover changes"
> command.  

I'd advise against that approach because you are going to
a) start adding any changes to the end of that changes file
b) potentially have problems  if the image tries to look into what it expects to see as method code.

Simplest is to use the FileBrowser to find the relevant changes file, click on it, note the 'recent changes' button that should appear and choose the date to start scanning from out of the list that should popup. Safe, clean, fast.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: LA: Lockout Access



Reply | Threaded
Open this post in threaded view
|

Re: Lost image - any suggestions?

Levente Uzonyi
In reply to this post by Tim Johnson-2
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
>
>