writeImageFile() without snapshot()?

Andreas Raab andreas.raab at gmx.de
Fri Oct 7 19:08:33 UTC 2005


You can *not* get away without a GC, simply because the GC state isn't 
preserved across snapshots. We actually had some obscure crashes related 
to this problem in the past (anyone remember the crashes caused by the 
root bit being set on the active context after a snapshot?)

In other words, the full GC is required to save the image in a 
well-known "right-after-full-gc-state". One would (at least) have to 
save sufficient information for the garbage collector to make this work. 
Likely other fixes too, since a full garbage collect cleans up many, 
many things that we usually don't even think about (cached contexts for 
example).

Cheers,
   - Andreas

tim Rowledge wrote:
> You might get away with no GC before a snapshot but please remember  
> that you do need to do various shutdown work to make the written  
> snapshot have a serious chance of being restartable.
> 
> I'm not in a position to provide a list; never tried it so I don't  know 
> what would go wrong. I _do_ know that a similar 'neat trick'  cost PPS a 
> very large amount of engineer time (and therefore direct  money out of 
> my budget as manager of the dept. back then) when so  twerp at a Large 
> Oval Logo Company decided that snapshotting in the  background every few 
> minutes would be a Good Idea. I can't recall the  details any longer - 
> getting too old - but it took _months_ to track  down the problem. It 
> was escalated to a total emergency, the GC was  blamed, my engineers 
> were blamed, I was blamed, the customer was  adamant that they had 
> never, would never, could never have done  anything that could have 
> caused it. When we solved the problem and  proved it was their code I 
> don't recall anybody even saying thanks.
> 
> So all in all I'm not sure I'd recommend doing a regular raw snapshot  
> in the background.
> 
> tim




More information about the Squeak-dev mailing list