<br><br><div class="gmail_quote">On Sat, Dec 10, 2011 at 2:16 AM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi Mariano,<br>
<br>
This looks like a nasty bug in the plugin, but I cannot reproduce it.<br>
I have Fuel loaded in my Squeak image running on Linux, and I ran<br>
FLMethodContextSerializationTest&gt;&gt;testMethodContextThisContext without<br>
a crash. I tried it on both Cog and a standard VM, and did not get<br>
a crash in either case. The test fails (probably for some Squeak/Pharo issue)<br>
but it gets through the serialize/materialize part of the test without<br>
any problem.<br>
<br>
Am I perhaps running a different version of Fuel that does not<br>
exercise the ZipPlugin in the same way?<br>
<br></blockquote><div><br>Yes, exactly. Sorry for not saying that before. If you want to reproduce it, you must also install the package FuelCompression and then change FLSerializationTest &gt;&gt; #setUp  to send the message #useGzipInMemoryStream  rather than #useStandardFileStream. Now if you run #testMethodContextThisContext it would do it using a GZip stream.<br>
<br>Anyway, I have also sent an image to Eliot since he asked it. <br><br>Here it is the image: <a href="https://gforge.inria.fr/frs/download.php/29895/Pharo-CrashGzipThisContext.image.zip" target="_blank">https://gforge.inria.fr/frs/download.php/29895/Pharo-CrashGzipThisContext.image.zip</a><br>

I found a couple of interesting things:<br><br>1) it only fails the test for thisContext (testMethodContextThisContext)<div>, since the rest are ok.<br>2) I tried with StackVM as well as previous CogVMs and it also crash. However, there is a VM which it doesn&#39;t crash: Squeak5.8b4<br>

<br>With the attached image, you have opened the test to run (testMethodContextThisContext). In my case I can reproduce it always. <br> <br>Let me know if you could reproduce it.<br><br><br>@John:  indeed, it is very much likely there is a problem with the size, because it only crashes with #testMethodContextThisContext (and few others) where the graph we serialize is really big (in this case because we serialize thisContext which means we seralize the whole stack of senders and senders). And for the rest of the tests (which are smaller) it usually does not crash.  I will try to let you know the exact size.<br>
<br><br>Thanks in advance,</div><br><br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Dec 09, 2011 at 07:31:56PM +0100, Mariano Martinez Peck wrote:<br>
&gt;<br>
&gt; So...after debugging the VM, it looks it is crashing in DeflatePlugin &gt;&gt;<br>
&gt; encodeMatch: length distance: dist<br>
&gt;<br>
&gt; encodeMatch: length distance: dist<br>
&gt;     &quot;Encode the given match of length length starting at dist bytes ahead&quot;<br>
&gt;     | literal distance |<br>
&gt;     &lt;inline: true&gt;<br>
&gt;     zipLiterals at: zipLiteralCount put: length - DeflateMinMatch.<br>
&gt;     zipDistances at: zipLiteralCount put: dist.<br>
&gt;     literal := (zipMatchLengthCodes at: length - DeflateMinMatch).<br>
&gt;     zipLiteralFreq at: literal put: (zipLiteralFreq at: literal) + 1.<br>
&gt;     dist &lt; 257<br>
&gt;         ifTrue:[distance := zipDistanceCodes at: dist - 1]<br>
&gt;         ifFalse:[distance := zipDistanceCodes at: 256 + (dist - 1 bitShift:<br>
&gt; -7)].<br>
&gt;     zipDistanceFreq at: distance put: (zipDistanceFreq at: distance) + 1.<br>
&gt;     zipLiteralCount := zipLiteralCount + 1.<br>
&gt;     zipMatchCount := zipMatchCount + 1.<br>
&gt;     ^zipLiteralCount = zipLiteralSize &quot;We *must* flush&quot;<br>
&gt;         or:[(zipLiteralCount bitAnd: 16rFFF) = 0 &quot;Only check every N kbytes&quot;<br>
&gt;             and:[self shouldFlush]]<br>
&gt;<br>
&gt; When it does:     zipDistanceFreq at: distance put: (zipDistanceFreq at:<br>
&gt; distance) + 1.<br>
&gt; it gives a EXC_BAD_ACCESS.<br>
&gt; distance value is 1444965993<br>
&gt;<br>
&gt; The sender is #deflateBlock: lastIndex chainLength: chainLength goodMatch:<br>
&gt; goodMatch<br>
&gt; and sender #primitiveDeflateBlock<br>
&gt;<br>
&gt; If I do a call printAllStacks(), I get this part:<br>
&gt;<br>
&gt; (gdb) call printAllStacks()<br>
&gt; Process 0x1f70c924 priority 40<br>
&gt; 0xbff65968 M GZipWriteStream(DeflateStream)&gt;deflateBlock 555574892: a(n)<br>
&gt; GZipWriteStream<br>
&gt; 0xbff6598c M GZipWriteStream(DeflateStream)&gt;nextPutAll: 555574892: a(n)<br>
&gt; GZipWriteStream<br>
&gt; 0xbff659a8 M GZipWriteStream(DeflateStream)&gt;next:putAll:startingAt:<br>
&gt; 555574892: a(n) GZipWriteStream<br>
&gt; 0xbff659cc M FLBufferedWriteStream&gt;flushBuffer 556072120: a(n)<br>
&gt; FLBufferedWriteStream<br>
&gt; 0xbff659e4 M FLBufferedWriteStream&gt;nextBytesPutAll: 556072120: a(n)<br>
&gt; FLBufferedWriteStream<br>
&gt; 0xbff65a04 M FLBufferedWriteStream&gt;nextStringPut: 556072120: a(n)<br>
&gt; FLBufferedWriteStream<br>
&gt; 0xbff65a24 M [] in FLVariablesMapping&gt;serializeMappingOn: 557179132: a(n)<br>
&gt; FLVariablesMapping<br>
&gt; 0xbff65a44 M OrderedCollection&gt;do: 557179148: a(n) OrderedCollection<br>
&gt; 0xbff65a64 M FLVariablesMapping&gt;serializeMappingOn: 557179132: a(n)<br>
&gt; FLVariablesMapping<br>
&gt; 0xbff65a80 M<br>
&gt; FLFixedObjectCluster(FLPointerObjectCluster)&gt;serializeInstancesStepWith:<br>
&gt; 556081188: a(n) FLFixedObjectCluster<br>
&gt; 0xbff65a9c M FLSerialization&gt;clusterInstancesStepOf: 556076884: a(n)<br>
&gt; FLSerialization<br>
&gt; 0xbff65ab8 M [] in FLSerialization&gt;instancesStep 556076884: a(n)<br>
&gt; FLSerialization<br>
&gt;<br>
&gt;<br>
&gt; And from the gdb I get:<br>
&gt;<br>
&gt; #0    0x000b3721 in deflateBlockchainLengthgoodMatch at ZipPlugin.c:303<br>
&gt; #1    0x000b4a62 in primitiveDeflateBlock at ZipPlugin.c:719<br>
&gt; #2    0x1f400858 in ??<br>
&gt; #3    0x00067820 in threadSchedulingLoop at gcc3x-cointerpmt.c:45853<br>
&gt; #4    0x0003d79b in initialEnterSmalltalkExecutive at<br>
&gt; gcc3x-cointerpmt.c:18372<br>
&gt; #5    0x0003e45f in initStackPagesAndInterpret at gcc3x-cointerpmt.c:18839<br>
&gt; #6    0x00022ae8 in interpret at gcc3x-cointerpmt.c:2076<br>
&gt; #7    0x0006df20 in -[sqSqueakMainApplication runSqueak] at<br>
&gt; sqSqueakMainApplication.m:174<br>
&gt; #8    0x92ee186c in __NSFirePerformWithOrder<br>
&gt; #9    0x967fadd2 in __CFRunLoopDoObservers<br>
&gt; #10    0x967b6ced in __CFRunLoopRun<br>
&gt; #11    0x967b63c4 in CFRunLoopRunSpecific<br>
&gt; #12    0x967b61f1 in CFRunLoopRunInMode<br>
&gt; #13    0x98262e04 in RunCurrentEventLoopInMode<br>
&gt; #14    0x98262af5 in ReceiveNextEventCommon<br>
&gt; #15    0x98262a3e in BlockUntilNextEventMatchingListInMode<br>
&gt; #16    0x93159595 in _DPSNextEvent<br>
&gt; #17    0x93158dd6 in -[NSApplication<br>
&gt; nextEventMatchingMask:untilDate:inMode:dequeue:]<br>
&gt; #18    0x9311b1f3 in -[NSApplication run]<br>
&gt; #19    0x93113289 in NSApplicationMain<br>
&gt; #20    0x0006bec9 in main at main.m:52<br>
&gt;<br>
&gt;<br>
&gt; Any pointer is appreaciated.<br>
&gt;<br>
&gt; THanks<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Dec 2, 2011 at 11:57 PM, Diogenes Moreira &lt;<br>
&gt; <a href="mailto:diogenes.moreira@gmail.com">diogenes.moreira@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; en que SO estas corriendo..primitiva ??<br>
&gt; &gt; por otro lado que tenes en el PharoDebug.Log<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://about.me/diogenes.moreira" target="_blank">http://about.me/diogenes.moreira</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; 2011/12/2 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;:<br>
&gt; &gt; &gt; Hi guys. We are doing some experiments with Fuel and GZip streams... Now<br>
&gt; &gt; I<br>
&gt; &gt; &gt; have a beatiful test like this:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; testMethodContextThisContext<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     | materializedContext context |<br>
&gt; &gt; &gt;     context := thisContext copy.<br>
&gt; &gt; &gt;     materializedContext := self resultOfSerializeAndMaterialize: context.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and it crashes like crazy. From the VM crash stack, I can see:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Smalltalk stack dump:<br>
&gt; &gt; &gt; 0xbff66ba4 M GZipWriteStream(DeflateStream)&gt;deflateBlock 447551436: a(n)<br>
&gt; &gt; &gt; GZipWriteStream<br>
&gt; &gt; &gt; 0xbff66bc8 M GZipWriteStream(DeflateStream)&gt;nextPutAll: 447551436: a(n)<br>
&gt; &gt; &gt; GZipWriteStream<br>
&gt; &gt; &gt; 0xbff66be4 M GZipWriteStream(DeflateStream)&gt;next:putAll:startingAt:<br>
&gt; &gt; &gt; 447551436: a(n) GZipWriteStream<br>
&gt; &gt; &gt; 0xbff66c08 M FLBufferedWriteStream&gt;flushBuffer 448048664: a(n)<br>
&gt; &gt; &gt; FLBufferedWriteStream<br>
&gt; &gt; &gt; 0xbff66c20 M FLBufferedWriteStream&gt;nextBytesPutAll: 448048664: a(n)<br>
&gt; &gt; &gt; FLBufferedWriteStream<br>
&gt; &gt; &gt; 0xbff66c40 M FLBufferedWriteStream&gt;nextStringPut: 448048664: a(n)<br>
&gt; &gt; &gt; FLBufferedWriteStream<br>
&gt; &gt; &gt; 0xbff66c5c M FLByteStringCluster&gt;serialize:on: 448054196: a(n)<br>
&gt; &gt; &gt; FLByteStringCluster<br>
&gt; &gt; &gt; 0xbff66c7c M<br>
&gt; &gt; FLByteStringCluster(FLPrimitiveCluster)&gt;serializeInstance:with:<br>
&gt; &gt; &gt; 448054196: a(n) FLByteStringCluster<br>
&gt; &gt; &gt; 0xbff66ca0 M [] in<br>
&gt; &gt; &gt; FLByteStringCluster(FLIteratingCluster)&gt;serializeInstances: 448054196:<br>
&gt; &gt; a(n)<br>
&gt; &gt; &gt; FLByteStringCluster<br>
&gt; &gt; &gt; 0xbff66cc8 M IdentitySet(Set)&gt;do: 451711680: a(n) IdentitySet<br>
&gt; &gt; &gt; 0xbff66ce4 M FLByteStringCluster(FLIteratingCluster)&gt;serializeInstances:<br>
&gt; &gt; &gt; 448054196: a(n) FLByteStringCluster<br>
&gt; &gt; &gt; 0xbff66d00 M<br>
&gt; &gt; &gt; FLByteStringCluster(FLIteratingCluster)&gt;serializeInstancesStepWith:<br>
&gt; &gt; &gt; 448054196: a(n) FLByteStringCluster<br>
&gt; &gt; &gt; 0xbff66d1c M FLSerialization&gt;clusterInstancesStepOf: 448053428: a(n)<br>
&gt; &gt; &gt; FLSerialization<br>
&gt; &gt; &gt; 0xbff66d38 M [] in FLSerialization&gt;instancesStep 448053428: a(n)<br>
&gt; &gt; &gt; FLSerialization<br>
&gt; &gt; &gt; 0xbff66d58 M OrderedCollection&gt;do: 449989736: a(n) OrderedCollection<br>
&gt; &gt; &gt; 0xbff66d74 M FLSerialization&gt;instancesStep 448053428: a(n)<br>
&gt; &gt; FLSerialization<br>
&gt; &gt; &gt; 0xbff66d8c M FLSerialization&gt;run 448053428: a(n) FLSerialization<br>
&gt; &gt; &gt; 0xbff66db0 I [] in FLSerializer&gt;defaultSerialization 447550464: a(n)<br>
&gt; &gt; &gt; FLSerializer<br>
&gt; &gt; &gt; 0xbff66dd8 M [] in FLSerializer&gt;serialize:on: 447550464: a(n)<br>
&gt; &gt; FLSerializer<br>
&gt; &gt; &gt; 0xbff66df8 M BlockClosure&gt;ensure: 448052884: a(n) BlockClosure<br>
&gt; &gt; &gt; 0xbff66e18 M FLSerializer&gt;serialize:on: 447550464: a(n) FLSerializer<br>
&gt; &gt; &gt; 0xbff66e3c M [] in<br>
&gt; &gt; &gt; FLMethodContextSerializationTest(FLSerializationTest)&gt;serialize:<br>
&gt; &gt; 447235380:<br>
&gt; &gt; &gt; a(n) FLMethodContextSerializationTest<br>
&gt; &gt; &gt; 0xbff66e60 M [] in GZipWriteStream class(PositionableStream class)&gt;on:do:<br>
&gt; &gt; &gt; 419845144: a(n) GZipWriteStream class<br>
&gt; &gt; &gt; 0xbff66e80 M BlockClosure&gt;ensure: 448048616: a(n) BlockClosure<br>
&gt; &gt; &gt; 0xbff66ea0 M GZipWriteStream class(PositionableStream class)&gt;on:do:<br>
&gt; &gt; &gt; 419845144: a(n) GZipWriteStream class<br>
&gt; &gt; &gt; 0xbff66ec4 M [] in FLGZipStrategy&gt;writeStreamDo: 447550896: a(n)<br>
&gt; &gt; &gt; FLGZipStrategy<br>
&gt; &gt; &gt; 0xbff66ee0 M FLByteArrayStreamStrategy&gt;writeStreamDo: 447550884: a(n)<br>
&gt; &gt; &gt; FLByteArrayStreamStrategy<br>
&gt; &gt; &gt; 0xbff66efc M FLGZipStrategy&gt;writeStreamDo: 447550896: a(n) FLGZipStrategy<br>
&gt; &gt; &gt; 0xbff66f18 M<br>
&gt; &gt; &gt; FLMethodContextSerializationTest(FLSerializationTest)&gt;serialize:<br>
&gt; &gt; 447235380:<br>
&gt; &gt; &gt; a(n) FLMethodContextSerializationTest<br>
&gt; &gt; &gt; 0xbff66f34 M<br>
&gt; &gt; &gt;<br>
&gt; &gt; FLMethodContextSerializationTest(FLSerializationTest)&gt;resultOfSerializeAndMaterialize:<br>
&gt; &gt; &gt; 447235380: a(n) FLMethodContextSerializationTest<br>
&gt; &gt; &gt; 0xbff66f58 M<br>
&gt; &gt; FLMethodContextSerializationTest&gt;testMethodContextThisContext<br>
&gt; &gt; &gt; 447235380: a(n) FLMethodContextSerializationTest<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; any idea of where I should start to look at?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt; Mariano<br>
&gt; &gt; &gt; <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Mariano<br>
&gt; <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>