[Vm-dev] [Cog] cmType ~= CMMethod

Mariano Martinez Peck marianopeck at gmail.com
Tue Dec 21 18:53:58 UTC 2010


On Mon, Dec 20, 2010 at 7:55 PM, Eliot Miranda <eliot.miranda at gmail.com>wrote:

>
> Hi Mariano,
>
>    this looks like a Cog VM bug.  You should try and create a reproducible
> case and then send it to me.
>

Hi Eliot. Define "reproducable case" ;)
Really, I don't have a simple TestCase/Doit that reproduce this, but I can
be sure that when running all my tests (that use objects as methods) it
crashes. If it is not in the first time, for SURE in the second. But as
said, it is not always in the same place not the same test. Because the
problem seems while running an incremental GC.

What I can provide you is a Pharo image, with all my code loaded, and the
test runner open with the test you have to run. And promise: if the first
time or second, you will have the crash.
I tried to upload the image to the gforge project and we have a problem
right now with it. I just send it by private email to you. I hope you don'y
bother.

I can tell you all this information:

- My tests are all about using proxies for compiled methods (subclasses of
proto object, not SmallInteger).
- The crash DOES NOT happens if I compile a StackVM, it ONLY happens in
CogVM.
- With Cog, I have the crash with both, Development or Production.

Thanks A LOT in advance,

Mariano




>
> On Mon, Dec 20, 2010 at 5:31 AM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>>
>> Hi Eliot. I am having some asserts failing while running my tests. Most of
>> them during the sweep phase of the GC.
>>
>> The two places where it fails is in
>>
>> - NewCoObjectMemory >> lastPointerWhileForwarding: oop
>>
>> if fails the assert:       self assert: (coInterpreter cCoerceSimple:
>> methodHeader to: #'CogMethod *') cmType = CMMethod.
>> In different runs, the cmType answer me 1 (CMFree)
>>
>> - NewCoObjectMemory >> lastPointerOf: oop recordWeakRoot: recordWeakRoot
>> "<Boolean>"
>>
>> and it fails in the same assert:        self assert: (coInterpreter
>> cCoerceSimple: methodHeader to: #'CogMethod *') cmType = CMMethod.
>>
>> In different runs, I got values 0 or 6. BTW....seing:
>>
>> initializeCogMethodConstants
>>     CMOpenPIC := 1 + (CMClosedPIC := 1 + (CMBlock := 1 +(CMMethod := 1 +
>> (CMFree := 1))))
>>
>> I cannot understand how can I get 0 or 6....
>>
>>
>> Anyway, my question is if you have a clue of what can be happening so that
>> those asserts are failing. I am using Objects as methods, but normal objects
>> (subclasses of ProtoObject).
>>
>> Thanks in advance,
>>
>> mariano
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20101221/7cdd81e7/attachment.htm


More information about the Vm-dev mailing list