[Vm-dev] Re: Reproducible way to crash Cog ( [Lsehub-staff] Strange behavior )

Igor Stasenko siguctua at gmail.com
Wed Dec 8 21:58:34 UTC 2010


On 8 December 2010 22:41, Benjamin <benjamin.vanryseghem.pharo at gmail.com> wrote:
>
> On Dec 8, 2010, at 10:28 PM, Igor Stasenko wrote:
>
>> Hello, Eliot
>>
>> today i tried to help and see what is strange (see original message
>> below).. and followed the instructions, but instead of 'strange' i got
>> VM crash. ;)
>>
>> I tried multiple Mac Cog VMs (one built by me, another, built by you),
>> and both crashing during GC.
>>
>> To reproduce, take the latest pharo-core image
>> (http://www.pharo-project.org/pharo-download/unstable-core)
>> Then evaluate following:
>>
>> Gofer new
>> squeaksource: 'Seed';
>> package: 'Seed-HaselBuilder';
>> load.
>>
>>
>> Then evaluate
>>  HaselKernelBuilder new script.
>>
>> if next to that you do (if it not crashed already)
>>
>> Smalltalk garbageCollect.
>>
>>
>> and VM will crash guaranteed (or become unresponsive).
>>
>> I didn't investigated deeply, but i found that culprit is most probably in
>> HaselKernelBuilder>>copyClass:
>>
>>
>>
>> @ Benjamin. You have a mistake in your code (and that i think why it
>> behaves 'strange')
>> you setting the class of class to be the instance of 'metacopy'
>>
>> so, you have
>>
>> class copy -> metaclass copy basicNew -> metaclass copy
>>
>> ('->' here means 'instance of' )
>>
>> while it should be
>>
>> class copy -> metaclass copy
>>
>> So
>>
>> cpy primitiveChangeClassTo: metaCopy basicNew.
>>
>> actually should be
>>
>> cpy primitiveChangeClassTo: metaCopy.
>>
>
> In fact, this primitive take the class of the argument to change the class
> of the receiver (yes I know, it's strange ...)

ah, sorry, my fault. Then its should be ok to do like that.
But i got another crash before getting to that line , so i didn't have
change to test it.
It seems something wrong happening during method copying.

I never used this prim before, so i didn't knew that it takes the
class of argument,
instead an argument itself as a class to which replace receiver's class.

>
> The 'strange' behavior is also a crash from the VM,  but not in the kernel
> creation.
>
>
> Thank you for your advice (and the beach volley ^^)
>
> Ben
>
>
>>
>> ---------- Forwarded message ----------
>> From: Benjamin <benjamin.vanryseghem at gmail.com>
>> Date: 8 December 2010 17:15
>> Subject: [Lsehub-staff] Strange behavior
>> To: RMoD private list <lsehub-staff at lists.gforge.inria.fr>
>>
>>
>> Hello guys,
>>
>> I've a strange error when I'm trying to trace some objects, and even
>> after spending the whole day on it, I still do not understand why, so
>> if you have any idea, you're welcome :)
>>
>>
>> Source :
>>
>> Gofer new
>> squeaksource: 'Seed';
>> package: 'Seed-HaselBuilder';
>> load.
>>
>>
>> Method :
>>
>> Then open a Transcript and evaluate
>>
>> HaselKernelBuilder new script.
>> tracedObjects := Dictionary new. objects := Dictionary new. object :=
>> Object. HaselImageBuilder new trace: object in: objects from: nil
>> tracedObjects: tracedObjects.
>>
>>
>> Thank you in advance,
>>
>>
>> Ben
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list