<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-13 16:22 GMT+02:00 David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span>:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On Sun, Jul 13, 2014 at 09:55:41AM -0400, David T. Lewis wrote:<br>
&gt; On Sun, Jul 06, 2014 at 12:47:25PM -0400, David T. Lewis wrote:<br>
&gt; &gt; On Sun, Jul 06, 2014 at 12:23:11PM -0400, David T. Lewis wrote:<br>
&gt; &gt; &gt; On Sun, Jul 06, 2014 at 10:34:15AM +0200, Nicolas Cellier wrote:<br>
&gt; &gt; &gt; &gt; 2014-07-04 0:47 GMT+02:00 Nicolas Cellier &lt;<br>
&gt; &gt; &gt; &gt; <a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt;:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; 2014-07-04 0:09 GMT+02:00 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;:<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; On Thu, Jul 3, 2014 at 12:33 PM, Nicolas Cellier &lt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; <a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; The bug is repeatable, i simply have to execute this snippet with my<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; test file:<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; (FileStream fileNamed: &#39;snapshot.bin&#39;) binary contentsOfEntireFile<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; asString zipped.<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; The file is too big for an attachment here - 7.3 Mbytes - or 1.7 Mbytes<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; gzipped by external tool.<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt; If someone can suggest an upload site, or want it by mail, just ask.<br>
&gt; &gt; &gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt; You&#39;re welcome to put it on <a href="http://ftp.mirandanamda.org" target="_blank">ftp.mirandanamda.org</a>, cogftpuser, pw cogging<br>
&gt; &gt; &gt; &gt; &gt;&gt; with 0&#39;s &amp; 1&#39;s.<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; &gt; done, pollution of your site engaged...<br>
&gt; &gt; &gt; &gt; &gt; Thanks Eliot!<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt; I inquired a bit more about this bug.<br>
&gt; &gt; &gt; &gt; An important clue is that it does not happen in Pharo3.0!<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; But Pharo3.0 did not fundamentally change compression<br>
&gt; &gt; &gt; &gt; (except some FileSystem related changes, separation of CRC stuff in another<br>
&gt; &gt; &gt; &gt; package, some other cosmetic changes like replacing some self assert: ...<br>
&gt; &gt; &gt; &gt; by [...] assert and a potential bug in<br>
&gt; &gt; &gt; &gt; DeflateStream&gt;&gt;nextPutAll:startingAt: introduced by CamilleTeruel).<br>
&gt; &gt; &gt; &gt; Squeak behavior is presumably not due to a Compression change.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Neither is it a VM problem, the bugs still shows up when running the Squeak<br>
&gt; &gt; &gt; &gt; image with Pharo VM.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Yes, it is definite a problem in the Squeak trunk image.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; So the difference lies somewhere else: in our beloved Stream.<br>
&gt; &gt; &gt; &gt; I remembered a recent change of Eliot related to handling of Stream created<br>
&gt; &gt; &gt; &gt; with on:from:to: (Collections-eem.567).<br>
&gt; &gt; &gt; &gt; Reverting those changes just make the snippet pass!<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Ah ah! At the time, i found the change of Eliot quite minimal and nice.<br>
&gt; &gt; &gt; &gt; But I wish I had time to analyze this small innocent change deeper.<br>
&gt; &gt; &gt; &gt; Indeed, I remembered I previously broke my teeth on this one 2 years or so<br>
&gt; &gt; &gt; &gt; ago, and preferred to adopt another strategy: avoid using on:from:to: and<br>
&gt; &gt; &gt; &gt; ReadWriteStream as much as possible.<br>
&gt; &gt; &gt; &gt; Why? because when analyzing the usage of inst.var. in Stream hierarchy, it<br>
&gt; &gt; &gt; &gt; gave me headaches, some subclass are just ignoring superclass variables, or<br>
&gt; &gt; &gt; &gt; worse are bending the semantics of superclass variables.<br>
&gt; &gt; &gt; &gt; I came to the conclusion that I could not decently master a change of<br>
&gt; &gt; &gt; &gt; on:from:to:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I can not confirm this. I have an image in which I can reliably reproduce the<br>
&gt; &gt; &gt; failure in writing the MCZ to a file. I tried reverting the methods that were<br>
&gt; &gt; &gt; introduced in Collections-eem.567 and I am still getting the same failure.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Dave<br>
&gt; &gt;<br>
&gt; &gt; Oops, I spoke too soon. Indeed the problem appears as of Collections-eem.567,<br>
&gt; &gt; and does not appear in Collections-nice.566.<br>
&gt; &gt;<br>
&gt; &gt; So I am confirming Nicolas&#39; observations ... now to find the bug :)<br>
&gt; &gt;<br>
&gt; &gt; Dave<br>
&gt; &gt;<br>
&gt;<br>
&gt; This seems to be a rather tricky bug, and I don&#39;t think any of us knows the<br>
&gt; cause right now. In case anyone else wants to have a look at it, here is a<br>
&gt; recipe for reproducing the bug in a clean 4.5 image:<br>
&gt;<br>
&gt; - Start with a clean Squeak 4.5 image in and empty working directory.<br>
&gt;       <a href="ftp://ftp.squeak.org/4.5/Squeak4.5-13680.zip" target="_blank">ftp://ftp.squeak.org/4.5/Squeak4.5-13680.zip</a><br>
&gt;<br>
&gt; - Open the image, do not update it.<br>
&gt;<br>
&gt; - Open an MC browser and add the <a href="http://source.squeak.org/trunk" target="_blank">http://source.squeak.org/trunk</a> repository for the Help-Squeak-Project package and Collections package.<br>
&gt;<br>
&gt; - Load Help-Squeak-Project-kfr.18 from trunk.<br>
&gt;<br>
&gt; - Load Collections-eem.567 from trunk.<br>
&gt;<br>
&gt; - Open a browser on class SqueakToolsDebuggerHelp, and delete the class side method #showDebuggerMenuForm.<br>
&gt;<br>
&gt; - Remove the <a href="http://source.squeak.org/trunk" target="_blank">http://source.squeak.org/trunk</a> repository form the Help-Squeak-Project package in the MC browser.<br>
&gt;<br>
&gt; - Highlight your package-cache repository and try to save Help-Squeak-project to the package-cache repository.<br>
&gt;<br>
&gt; - Enter author initials &#39;dtl&#39;.<br>
&gt;<br>
&gt; - For the package comment, enter &#39;Remove unreferenced method&#39;.<br>
&gt;<br>
&gt; - Package save will fail part way through saving the MCZ.<br>
&gt;<br>
&gt; - To reproduce the failure in this image, do the following in a workspace:<br>
&gt;<br>
&gt;       mcv := MCVersion allInstances detect: [:e | e name = &#39;a MCVersion(Help-Squeak-Project-dtl.19)&#39;].<br>
&gt;       [f := FileStream fileNamed: &#39;junk.mcz&#39;.<br>
&gt;       mcv fileOutOn: f]<br>
&gt;               ensure: [f close].<br>
&gt;<br>
<br>
</div></div>In addition to the above recipe, here are some other observations:<br>
<br>
- Reverting from Collections-eem.567 to Collections-nice.566 makes the<br>
  problem go away, but ONLY if the DeflatePlugin is active.<br>
<br>
- The failure appears while executing the fallback code for #primitiveDeflateBlock<br>
  in ZipWriteStream&gt;&gt;deflateBlock:chainLength:goodMatch:<br>
<br>
- If this primitive is deactivate by commenting out the<br>
  &lt;primitive: &#39;primitiveDeflateBlock&#39; module: &#39;ZipPlugin&#39;&gt; in<br>
  ZipWriteStream&gt;&gt;deflateBlock:chainLength:goodMatch: then the problem will<br>
  occur regardless of which version of Collections is loaded.<br>
<br>
- When Collections-eem.567 is loaded, the primitive will fail on the 22nd<br>
  call to #deflateBlock:chainLength:goodMatch: and a debugger appears during<br>
  execution of the fallback code.<br>
<br>
- When Collections-nice.566 is loaded, the primitive does not fail on the 22nd<br>
  call to #deflateBlock:chainLength:goodMatch:, the fallback code is never run,<br>
  and no error appears.<br>
<br>
- When Collections-nice.566 is loaded and the primitive is disabled to force<br>
  use of the fallback code, the error appears on on the 22nd call to<br>
  #deflateBlock:chainLength:goodMatch: in exactlly the same place as when<br>
  Collections-eem.567 is loaded.<br>
<br>
- If I inspect the ZipWriteStream at the failure point (when the debugger pops<br>
  up after the problem), I see no obvious difference in the state of the stream<br>
  between the Collections-eem.567 case versus the Collections-nice.566 with<br>
  primitive disabled case.<br>
<br>
Dave<br>
<br>
<br></blockquote><div>Very good mining work!<br></div><div>When I hear  Stream, I think fluid...<br></div><div>But these snags make it so viscous, it&#39;s like our Stream is going to freeze soon.<br></div><div>Or is it more than frozen? The vein you&#39;re after sounds as hard as diamond, we gonna need a sharp peak pickaxe.<br>

</div></div><br></div></div>