Hi Jorge,<div><br></div><div> I've taken a look at this and its horrible. Basically the debug VM (no optimization, asserts, and so fully debuggable) doesn't fail. Only the production and assert (-O1, asserts) show failuresa. But since this is in TestRunner it is extremely difficult to compare the three VMs rto find out where the difference lies becauee TestRunner runs things in a random order.</div>
<div><br></div><div>So could you do me a favour and construct an image where the tests are run in a fixed order and show the error? Please try and avoid the test that asks for one's name. I want to be able to run the image from the C debugger without user intervention to analyse exactly what's going on.</div>
<div><br></div><div>Thanks in advance<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 2:27 PM, Jorge Ressia <span dir="ltr"><<a href="mailto:jorge.ressia@gmail.com">jorge.ressia@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Eliot,<br>
<br>
I put the image in <a href="http://dl.dropbox.com/u/14991225/Bifrost-Eliot.zip" target="_blank">http://dl.dropbox.com/u/14991225/Bifrost-Eliot.zip</a><br>
I am using VM.r2486.<br>
<br>
The object as method class is called HLMethod. I reverted the change<br>
on flushCache to have the previous implementation that breaks.<br>
If you run the tests in BFBehavioralMetaObjectTest, particularly the<br>
category "test - state write" several time at some point some tests<br>
are going to fail due to a DNU on GMDualCounter>>initialize.<br>
<br>
If you change the HLMethod>>flushCache to<br>
<br>
flushCache<br>
<primitive: 116><br>
<br>
This errors disappear.<br>
<br>
Sorry that I do not have a simpler example to reproduce the case but i<br>
tried to simplify it but could not reproduce it. I think that is has<br>
to do with the number of times that I change the compiled method at<br>
runtime.<br>
<br>
Cheers,<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On Mon, Aug 8, 2011 at 9:32 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
> Hi Jorge,<br>
><br>
> On Mon, Aug 8, 2011 at 12:20 PM, Jorge Ressia <<a href="mailto:jorge.ressia@gmail.com">jorge.ressia@gmail.com</a>> wrote:<br>
>><br>
>> Hi Eliot,<br>
>><br>
>> I am experiencing the same problem as Lukas.<br>
>> I was having random DNU on replaced methods.<br>
>> I fixed the problem by flushing the cache on the compiled methods<br>
>> only, before I was flushing on the selector and on the class.<br>
>> It is not yet clear to me what is the right way of flushing the cache.<br>
>> Any explanation on that?<br>
><br>
> Hmmm, no. I would have thought that the right thing to do was to flush the selector. Do you have an image containing a reproducible case I can test?<br>
>><br>
>> I think that this goes along with<br>
>> <a href="http://code.google.com/p/pharo/issues/detail?id=2255" target="_blank">http://code.google.com/p/pharo/issues/detail?id=2255</a><br>
>> <a href="http://forum.world.st/flushCache-with-MethoWrappers-in-CogVM-td3381310.html" target="_blank">http://forum.world.st/flushCache-with-MethoWrappers-in-CogVM-td3381310.html</a><br>
>><br>
>> Eliot, if you need help debugging or testing a potential solution let<br>
>> me know, I have a bunch of test working on top of this.<br>
>><br>
>> Cheers,<br>
>><br>
>> On Mon, Jul 11, 2011 at 6:31 PM, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
>> ><br>
>> > Hi All,<br>
>> > I'm in touch with Lukas on this but have no time to address it right now. worry not :)<br>
>> ><br>
>> > On Mon, Jul 11, 2011 at 3:05 AM, Mariano Martinez Peck <<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>> wrote:<br>
>> >><br>
>> >><br>
>> >> Maybe cc'ing VM mailing list can help.<br>
>> >><br>
>> >> On Fri, Jul 1, 2011 at 9:32 AM, Lukas Renggli <<a href="mailto:renggli@gmail.com">renggli@gmail.com</a>> wrote:<br>
>> >>><br>
>> >>> Hi Eliot,<br>
>> >>><br>
>> >>> I am using one of the latest VMs from your site (VM.r2434) and I<br>
>> >>> continue to have subtle problems with objects as methods (#flushCache,<br>
>> >>> #run:with:in:).<br>
>> >>><br>
>> >>> The issue is that the test coverage in Pharo is kind of broken on Cog<br>
>> >>> for a long time already. It reports methods as not covered that are<br>
>> >>> clearly covered, and tests seem to randomly fail.<br>
>> >>><br>
>> >>> I suspected that there is something wrong with the coverage code<br>
>> >>> itself. So I started to experiment with TestCoverage>>flushCache and<br>
>> >>> noticed that the current implementation<br>
>> >>><br>
>> >>> TestCoverage>>flushCache<br>
>> >>> self reference methodSymbol flushCache<br>
>> >>><br>
>> >>> performs not that well: The set of not covered methods is wrong and<br>
>> >>> many tests suddenly fail. If I replace it with<br>
>> >>><br>
>> >>> TestCoverage>>flushCache<br>
>> >>> self reference actualClass flushCache<br>
>> >>><br>
>> >>> I actually get accurate coverage information, but there are still a<br>
>> >>> few tests constantly failing. I tried to use all possible combinations<br>
>> >>> of #flushCache (also calling it on the compiled method), but only<br>
>> >>> flushing the cache on the class seems to work properly. So far so<br>
>> >>> good, but I really wonder what the correct way is to flush the cache?<br>
>> >>> :-)<br>
>> >>><br>
>> >>> For my experiments I was using the package 'AST-Tests-Semantics'. This<br>
>> >>> is a small package with lots of test methods that cover each method<br>
>> >>> but one (RBSemanticAnnotationMisssing>>#isResumable). Now the "real"<br>
>> >>> problem is that when running these tests in coverage mode, the same 4<br>
>> >>> tests always fail:<br>
>> >>><br>
>> >>> RBSemanticTest>>testBlockScope<br>
>> >>> RBSemanticTest>>testCascadeReceiver<br>
>> >>> RBSemanticTest>>testClassVariableBinding<br>
>> >>> RBSemanticTest>>testGlobalVariableBinding<br>
>> >>><br>
>> >>> Not sure of how to debug that? Do you have an idea why these otherwise<br>
>> >>> passing tests suddenly fail? If you want to try to reproduce you can<br>
>> >>> use any Pharo image with the tests loaded, or use those that I used:<br>
>> >>><br>
>> >>> <a href="http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.changes" target="_blank">http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.changes</a><br>
>> >>> <a href="http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.image" target="_blank">http://jenkins.lukas-renggli.ch/job/Development/lastSuccessfulBuild/artifact/omnibrowser-tests/omnibrowser-tests.image</a><br>
>> >>><br>
>> >>> Open the Test Runner, select 'AST-Tests-Semantics' and 'Run Coverage'.<br>
>> >>><br>
>> >>> Any help or clarification would be appreciated :-)<br>
>> >>><br>
>> >>> Lukas<br>
>> >>><br>
>> >>> --<br>
>> >>> Lukas Renggli<br>
>> >>> <a href="http://www.lukas-renggli.ch" target="_blank">www.lukas-renggli.ch</a><br>
>> >>><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Mariano<br>
>> >> <a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
>> >><br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > best,<br>
>> > Eliot<br>
>> ><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Jorge Ressia<br>
>> <a href="http://www.jorgeressia.com" target="_blank">www.jorgeressia.com</a><br>
><br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Jorge Ressia<br>
<a href="http://www.jorgeressia.com" target="_blank">www.jorgeressia.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>best,<div>Eliot</div><br>
</div>