<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-03-10 21:23 GMT+01:00 Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div dir="ltr">Hi All, but especially Nicolas and C experts,<div><br></div><div>    if you build a Mac 64-bit Pharo VM in production and assert configurations and run the below</div><div><br></div><div><span style="color:rgb(0,0,0);font-size:12.8px">wget </span><a href="http://files.pharo.org/get-files/60/pharo64.zip" rel="noreferrer" style="font-size:12.8px" target="_blank">files.pharo.org/get-<wbr>files/60/pharo64.zip</a><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">wget </span><a href="http://files.pharo.org/get-files/60/sources.zip" rel="noreferrer" style="font-size:12.8px" target="_blank">files.pharo.org/get-<wbr>files/60/sources.zip</a></div></div></blockquote><div><br></div><div>Or curl -O if you don't want to bother installing wget <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">unzip pharo64.zip</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">unzip sources.zip</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px">pharo64cfvm Pharo64-60438.image eval "VGTigerDemo runDemo" &</span></div><div><span style="color:rgb(0,0,0);font-size:12.8px">pharo64cavm Pharo64-60438.image eval "VGTigerDemo runDemo"</span><span style="color:rgb(0,0,0);font-size:12.8px"><br></span></div><div><span style="color:rgb(0,0,0);font-size:12.8px"><br></span></div><div><font color="#000000"><span style="font-size:12.8px">you'll see that in the Assert VM the screen is clean and the tiger is displayed within a white rectangle, but in the production VM there are lots of garbage pixels at the bottom and bottom right of the screen.  So somewhere in the display pipeline we have an optimization-related bug.  The Assert VM is optimized at -O1 and the production VM at -Os (favour space over time).</span></font></div><div class="gmail_extra"><br></div></div></blockquote><div>Nope.<br></div><div>The first two times I tried, there were the same artefacts with assert vm than with fast vm...<br><br>../Smalltalk/OpenSmalltalk/opensmalltalk-vm/build.macos64x64/pharo.cog.spur/PharoAssert.app/Contents/MacOS/Pharo ./Pharo64-60438.image eval "VGTigerDemo runDemo"<br><br>lisp < lifp 22113<br><br>lifp > lisp 22113<br>a VGTigerDemo<br><br></div><div>The 3rd time, the artefact had disappeared...<br><br><br></div><div>Then I tried moving the window and I could reproduce the failure.<br><br>../Smalltalk/OpenSmalltalk/opensmalltalk-vm/build.macos64x64/pharo.cog.spur/PharoAssert.app/Contents/MacOS/Pharo ./Pharo64-60438.image eval "VGTigerDemo runDemo"<br><br>lisp < lifp 22113<br><br>lifp > lisp 22113<br>PrimitiveFailed: primitive #primSignal:andReturnAs:fromContext: in SmallInteger failed<br><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br>SmallInteger(Object)>>primitiveFailed:<br>SmallInteger(Object)>>primitiveFailed<br>SmallInteger(VMCallbackContext64)>>primSignal:andReturnAs:fromContext:<br>GrafPort>>copyBits<br>GrafPort>>image:at:sourceRect:rule:<br></div><div>...snip...<br></div><div><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br><br>(ReceiverIndex + ((sp >> 3))) < (lengthOf(aContext)) 63951<br><br><br><br></div><div>Then I restarted the test, saw the artefacts, stopped the demo, resize the window, saved the image.<br></div><div>Now I got the PrimitiveFailed: primitive #primSignal:andReturnAs:fromContext: in SmallInteger failed at each start (before the demo starts).<br><br></div><div>If I start the saved image without eval demo, then it starts normally --- errr, exept it displays nothing (light gray background) untill I click inside.<br><br></div><div>Ah not allways...<br><br></div><div>I also get the artefacts with pharo.stack.spur, but the first time I tried, the space outer white demo square was black.<br></div><div><br></div><div>It looks to much like some sort of buffer overrun. Then anything can happen.<br></div><div><br><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 10, 2017 at 12:13 PM, Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Esteban,<div><br></div><div>    first of all hanks so much for the instructions.  It's so nice to just run the commands below and be able to reproduce immediately instead of having to root around through build servers, following links.  Thanks, it saves me a huge amount of time.  i really appreciate the effort.</div><div><br></div><div>Second, I find I can make the primitive fail much sooner if I pick up the main window and move it.  I was running it on one machine, wanted to run it on another with a different VM but the main window was in the way of the command.  So I moved the main window so I could read the command line and lo and behold it failed immediately.  So if I start the demo,and then pick up the window and move it, the primitive fails within very few seconds.  That could be a clue.</div></div><div class="gmail_extra"><div><div class="gmail-m_2826264583637736607h5"><br><div class="gmail_quote">On Fri, Mar 10, 2017 at 7:35 AM, Esteban Lorenzano <span dir="ltr"><<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hi,<br>
<br>
I’m tumbling into an error in Pharo, because we use callbacks intensively, in Athens(cairo)-to-World conversion in particular, and people is sending always their crash reports… we made the whole conversion a lot more robust since problems started to arise, but now I hit a wall I cannot solve: I think problem is in something in callbacks.<br>
<br>
And problem is showing very easy on 64bits (while in 32bits it takes time and is more random).<br>
<br>
Here is the easiest way to reproduce it (in mac):<br>
<br>
wget <a href="http://files.pharo.org/get-files/60/pharo64-mac-latest.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/p<wbr>haro64-mac-latest.zip</a><br>
wget <a href="http://files.pharo.org/get-files/60/pharo64.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/p<wbr>haro64.zip</a><br>
wget <a href="http://files.pharo.org/get-files/60/sources.zip" rel="noreferrer" target="_blank">files.pharo.org/get-files/60/s<wbr>ources.zip</a><br>
unzip pharo64-mac-latest.zip<br>
unzip pharo64.zip<br>
unzip sources.zip<br>
./Pharo.app/Contents/MacOS/Pha<wbr>ro ./Pharo64-60438.image eval "VGTigerDemo runDemo"<br>
<br>
eventually (like 5-6 seconds after, if not immediately), you will have a stack like this:<br>
<br>
SmallInteger(Object)>>primitiv<wbr>eFailed:<br>
SmallInteger(Object)>>primitiv<wbr>eFailed<br>
SmallInteger(VMCallbackContext<wbr>64)>>primSignal:andReturnAs:fr<wbr>omContext:<br>
GrafPort>>copyBits<br>
GrafPort>>image:at:sourceRect:<wbr>rule:<br>
FormCanvas>>image:at:sourceRec<wbr>t:rule:<br>
FormCanvas(Canvas)>>drawImage:<wbr>at:sourceRect:<br>
FormCanvas(Canvas)>>drawImage:<wbr>at:<br>
VGTigerDemo>>runDemo<br>
VGTigerDemo class>>runDemo<br>
UndefinedObject>>DoIt<br>
OpalCompiler>>evaluate<br>
OpalCompiler(AbstractCompiler)<wbr>>>evaluate:<br>
[ result := Smalltalk compiler evaluate: aStream.<br>
self hasSessionChanged<br>
        ifFalse: [ self stdout<br>
                        print: result;<br>
                        lf ] ] in EvaluateCommandLineHandler>>ev<wbr>aluate: in Block: [ result := Smalltalk compiler evaluate: aStream....<br>
BlockClosure>>on:do:<br>
EvaluateCommandLineHandler>>ev<wbr>aluate:<br>
EvaluateCommandLineHandler>>ev<wbr>aluateArguments<br>
EvaluateCommandLineHandler>>ac<wbr>tivate<br>
EvaluateCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>
[ aCommandLinehandler activateWith: commandLine ] in PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activateSu<wbr>bCommand: in Block: [ aCommandLinehandler activateWith: commandLine ]<br>
BlockClosure>>on:do:<br>
PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activateSu<wbr>bCommand:<br>
PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>handleSubc<wbr>ommand<br>
PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>handleArgu<wbr>ment:<br>
[ self<br>
        handleArgument:<br>
                (self arguments<br>
                        ifEmpty: [ '' ]<br>
                        ifNotEmpty: [ :arguments | arguments first ]) ] in PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activate in Block: [ self...<br>
BlockClosure>>on:do:<br>
PharoCommandLineHandler(BasicC<wbr>ommandLineHandler)>>activate<br>
PharoCommandLineHandler>>activ<wbr>ate<br>
PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:<br>
[ super activateWith: aCommandLine ] in PharoCommandLineHandler class>>activateWith: in Block: [ super activateWith: aCommandLine ]<br>
<br>
Any idea?<br>
<br>
thanks!<br>
<span class="gmail-m_2826264583637736607m_-4949633475011652511HOEnZb"><font color="#888888">Esteban</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="gmail-m_2826264583637736607HOEnZb"><font color="#888888">-- <br><div class="gmail-m_2826264583637736607m_-4949633475011652511gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_2826264583637736607gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
<br></blockquote></div><br></div></div>