<div dir="ltr"><div>Note that the inst var swapping is a dirty hack...<br>The obsolete CompiledMethod on the stack will index the wrong inst. var. after the swapping, but since size was unused and nil, and since the code was robust to such nil, it worked.<br>
</div>But don&#39;t take this hack for a general recipe!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/18 Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hooray for Chris and Nicolas!<br>
<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 17 October 2013 01:45, Chris Muller &lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt; wrote:<br>
&gt; On Wed, Oct 16, 2013 at 4:07 PM, Nicolas Cellier<br>
&gt; &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt;&gt; To reproduce, just load System-cmm.602 from a MC browser and it quits quite<br>
&gt;&gt; fast...<br>
&gt;&gt; From assert cog vm, here is the end of the report:<br>
&gt;&gt;<br>
&gt;&gt; **IncrementalGC**<br>
&gt;&gt; **FullGC**<br>
&gt;&gt;<br>
&gt;&gt; stack page bytes 2048 available headroom 1252 minimum unused headroom 724<br>
&gt;&gt;<br>
&gt;&gt;     (sweep failed to find exact end of memory)<br>
&gt;&gt; Abort trap<br>
&gt;&gt;<br>
&gt;&gt; and the beginning is:<br>
&gt;&gt;<br>
&gt;&gt; sweep failed to find exact end of memory<br>
&gt;&gt;<br>
&gt;&gt; Squeak VM version: 4.0 4.0.2778 Mac OS X built on Aug  8 2013 07:43:35<br>
&gt;&gt; Compiler: 4.2.1 (Apple Inc. build 5666) (dot 3) [Assert VM]<br>
&gt;&gt; Built from: CoInterpreter * VMMaker.oscog-nice.336 uuid:<br>
&gt;&gt; 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013<br>
&gt;&gt; With: StackToRegisterMappingCogit * VMMaker.oscog-nice.336 uuid:<br>
&gt;&gt; 409e5084-5ffa-466c-a844-2473662c1ebf Sep  8 2013<br>
&gt;&gt; Revision: VM: r2778 <a href="http://squeakvm.org/svn/squeak/branches/Cog" target="_blank">http://squeakvm.org/svn/squeak/branches/Cog</a><br>
&gt;&gt; Plugins: r2545 <a href="http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins" target="_blank">http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; C stack backtrace:<br>
&gt;&gt; 0   Squeak                              0x0004deec reportStackState + 147<br>
&gt;&gt; 1   Squeak                              0x0004e26b error + 31<br>
&gt;&gt; 2   Squeak                              0x000b43ec fullGC + 897<br>
&gt;&gt; 3   Squeak                              0x000b4cd5 sufficientSpaceAfterGC +<br>
&gt;&gt; 64<br>
&gt;&gt; 4   Squeak                              0x000b6094 primitiveNewWithArg + 147<br>
&gt;&gt; 5   ???                                 0x11acc789 0x0 + 296535945<br>
&gt;&gt; 6   Squeak                              0x000c9795 interpret + 32627<br>
&gt;&gt; 7   Squeak                              0x000429dd EventLoopEventHandler +<br>
&gt;&gt; 28<br>
&gt;&gt; 8   HIToolbox                           0x911eac2f<br>
&gt;&gt; _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec<br>
&gt;&gt; + 1567<br>
&gt;&gt; 9   HIToolbox                           0x911e9ef6<br>
&gt;&gt; _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec<br>
&gt;&gt; + 411<br>
&gt;&gt; 10  HIToolbox                           0x911e9d55<br>
&gt;&gt; SendEventToEventTargetWithOptions + 58<br>
&gt;&gt; 11  HIToolbox                           0x9121ea24<br>
&gt;&gt; _ZL29ToolboxEventDispatcherHandlerP25OpaqueEventHandlerCallRefP14OpaqueEventRefPv<br>
&gt;&gt; + 3006<br>
&gt;&gt; 12  HIToolbox                           0x911eb080<br>
&gt;&gt; _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec<br>
&gt;&gt; + 2672<br>
&gt;&gt; 13  HIToolbox                           0x911e9ef6<br>
&gt;&gt; _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec<br>
&gt;&gt; + 411<br>
&gt;&gt; 14  HIToolbox                           0x9120c7f3 SendEventToEventTarget +<br>
&gt;&gt; 52<br>
&gt;&gt; 15  HIToolbox                           0x91395c17 ToolboxEventDispatcher +<br>
&gt;&gt; 86<br>
&gt;&gt; 16  HIToolbox                           0x91395d4f RunApplicationEventLoop +<br>
&gt;&gt; 243<br>
&gt;&gt; 17  Squeak                              0x00040e61<br>
&gt;&gt; RunApplicationEventLoopWithSqueak + 185<br>
&gt;&gt; 18  Squeak                              0x0004de37 main + 1079<br>
&gt;&gt; 19  Squeak                              0x000027be start + 54<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Smalltalk stack dump:<br>
&gt;&gt; 0xbffeb058 M Array(SequenceableCollection)&gt;select: 0x13fe1d04: a(n) Array<br>
&gt;&gt; 0xbffeb074 M MCFileRepositoryInspector&gt;versionNamesForSelectedPackage<br>
&gt;&gt; 0x135d28b0: a(n) MCFileRepositoryInspector<br>
&gt;&gt; 0xbffeb094 M MCFileRepositoryInspector(MCRepositoryInspector)&gt;versionList<br>
&gt;&gt; 0x135d28b0: a(n) MCFileRepositoryInspector<br>
&gt;&gt;<br>
&gt;&gt; Squeak stack has no importance, I just clicked somewhere in a MC trunk repo<br>
&gt;&gt; inspector...<br>
&gt;&gt;<br>
&gt;&gt; It sounds like memory corruption...<br>
&gt;&gt;<br>
&gt;&gt; What it interesting is that loading this mcz also blow a 4.10.10 interpreter<br>
&gt;&gt; VM...<br>
&gt;&gt;<br>
&gt;&gt; I just fail to see what could cause such a violent ... Ah WAIT WAIT WAIT:<br>
&gt;&gt;<br>
&gt;&gt; MCPackageLoader&gt;&gt;basicLoad invoke RecentMessages default suspendWhile: [ ]<br>
&gt;&gt; suspendWhile is using the last instance variable... which is being shifted<br>
&gt;&gt; inside the suspendWhile: []...<br>
&gt;&gt; So when we&#39;re back from the block, it&#39;s not long before die...<br>
&gt;<br>
&gt; Ahh!!  THANK YOU and compliments for an awesome diagnosis!  I was<br>
&gt; leisurely digging for a couple of hours today, I was stuck thinking my<br>
&gt; changes were benign.  My image updated fine after I committed it.<br>
&gt;<br>
&gt; I guess I found a tricky land mine!<br>
&gt;<br>
&gt;&gt; At least i&#39;m happy it&#39;s not related to CharacterScanner stuff.<br>
&gt;<br>
&gt; My bad.  :)  I&#39;ll post a fix.<br>
&gt;<br>
<br>
</div></div></blockquote></div><br></div>