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.
---------- Forwarded message ---------- From: Benjamin benjamin.vanryseghem@gmail.com Date: 8 December 2010 17:15 Subject: [Lsehub-staff] Strange behavior To: RMoD private list lsehub-staff@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
Hi Igor,
thanks for this. Note to self: this is in ~/Squeak/PharoCore-1.2-12261
BTW, you can try and build the debug VM and use that. It has asserts built-in that may find the problem earlier. The mvm script makes a Debug.app by default.
HTH Eliot
On Wed, Dec 8, 2010 at 1:28 PM, Igor Stasenko siguctua@gmail.com 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.
---------- Forwarded message ---------- From: Benjamin benjamin.vanryseghem@gmail.com Date: 8 December 2010 17:15 Subject: [Lsehub-staff] Strange behavior To: RMoD private list lsehub-staff@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.
On 8 December 2010 22:43, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Igor, thanks for this. Note to self: this is in ~/Squeak/PharoCore-1.2-12261 BTW, you can try and build the debug VM and use that. It has asserts built-in that may find the problem earlier. The mvm script makes a Debug.app by default.
yeah, i will take a look at it tomorrow. Benjamin's code mangling with compiled methods, and i don't know if there are anything ok with it. But anyways, if there are a chance to close the security hole, which is uncovered by his code, we should do that :)
P.S. it is something really strange happening to Cog GC on Mac (or maybe it is i too lucky) , remember my previous problem with pow() function used inside fullGC(), which also leaded to crash. Once i rewrote the code to use bit shifts, it works normally.
It is always happen to newbie (being lucky), because they don't know the rough corners of system and can discover something, which others can't never discover, because they won't even think to do something like newbie does, because they taught to do otherwise :)
HTH Eliot
vm-dev@lists.squeakfoundation.org