Hi, I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage" and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message: Segmentation fault Sun May 26 15:46:45 2013 pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/] C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668] Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>? Most recent primitives class class class class class class class
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case. Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars. method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work... method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res So it looks like a problem in the JIT cache not cleared :). Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P. Guille On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com>wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot. However, I managed to hack the VM to make it work :). It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend: methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord)); if (isCogMethodReference(methodHeader2) *&& isCompiledMethodHeader (methodHeader2)*) { /* begin externalizeIPandSP */ assert((((usqInt)localIP)) != (ceReturnToInterpreterPC())); GIV(instructionPointer) = oopForPointer(localIP); GIV(stackPointer) = localSP; GIV(framePointer) = localFP; executeCoggedNewMethodmethodHeader(1, methodHeader2); } And it works :). I cc Eliot, so maybe he has an idea... Guille On Thu, May 30, 2013 at 5:43 PM, Guillermo Polito <guillermopolito@gmail.com
wrote:
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case.
Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars.
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work...
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
So it looks like a problem in the JIT cache not cleared :).
Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P.
Guille
On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com>wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code. Original: CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod] Now in subclass (NBCoInterpreter) i made this: internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." | methodHeader | methodHeader := self rawHeaderOf: newMethod. (self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ]. primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod] === The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there) The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start) This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image). Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod. Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it. I would like to hear Eliot's comments on this. -- Best regards, Igor Stasenko.
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe. Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." And in #addNewMethodToCache: there is as a first statement: [...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [*primitiveFunctionPointer := #primitiveInvokeObjectAsMethod*]. [...] So I'd say that both objects as methods and primitives are kind of handled in the same way after? On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
Actually, from CoInterpreter: addNewMethodToCache: class "Override to refuse to cache other than compiled methods. This protects open PICs against having to test for compiled methods." (objectMemory isOopCompiledMethod: newMethod) ifFalse: [primitiveFunctionPointer := #primitiveInvokeObjectAsMethod. ^self]. super addNewMethodToCache: class On Fri, May 31, 2013 at 9:20 AM, Guillermo Polito <guillermopolito@gmail.com
wrote:
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe.
Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand
"For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
And in #addNewMethodToCache: there is as a first statement:
[...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [*primitiveFunctionPointer := #primitiveInvokeObjectAsMethod*]. [...]
So I'd say that both objects as methods and primitives are kind of handled in the same way after?
On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
I'll make a summary from what I understand... Maybe we should move this discussion to the VM list, but I'm not sure. - Igor made changes to support the primitive 220 - those changes may try to activate a non-method object - I added a check to tell if it is a compiled method or not to the new code, so if it's not it flows through the old method handling (which uses the primitiveFunctionPointer I assume right from the CoInterpreter implementation) This, I see should be taken into account into #internalExecuteNewMethod and #executeNewMethod, which are preeeeeeety similar and both have the same change :). Maybe I'm making nonsense again, It's difficult to say to me. I just want to help fixing this. Tx!!! Guille On Fri, May 31, 2013 at 9:28 AM, Guillermo Polito <guillermopolito@gmail.com
wrote:
Actually, from CoInterpreter:
addNewMethodToCache: class "Override to refuse to cache other than compiled methods. This protects open PICs against having to test for compiled methods." (objectMemory isOopCompiledMethod: newMethod) ifFalse: [primitiveFunctionPointer := #primitiveInvokeObjectAsMethod. ^self]. super addNewMethodToCache: class
On Fri, May 31, 2013 at 9:20 AM, Guillermo Polito < guillermopolito@gmail.com> wrote:
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe.
Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand
"For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
And in #addNewMethodToCache: there is as a first statement:
[...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [*primitiveFunctionPointer := #primitiveInvokeObjectAsMethod*]. [...]
So I'd say that both objects as methods and primitives are kind of handled in the same way after?
On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com>wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
On 31 May 2013 09:20, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe.
Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand
"For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
Yes, my bad.. It is hard to see that in code: the logic to handle objects-as-method. So, yes, please fix executNewMethod and internalExecuteNewMethod with this additional check.
And in #addNewMethodToCache: there is as a first statement:
[...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [primitiveFunctionPointer := #primitiveInvokeObjectAsMethod]. [...]
So I'd say that both objects as methods and primitives are kind of handled in the same way after?
On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
It is fixed in latest vm (which you can get from the zeroconf script http://get.pharo.org/vmLatest) :). Guille On Fri, May 31, 2013 at 1:25 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 31 May 2013 09:20, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe.
Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand
"For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
Yes, my bad.. It is hard to see that in code: the logic to handle objects-as-method. So, yes, please fix executNewMethod and internalExecuteNewMethod with this additional check.
And in #addNewMethodToCache: there is as a first statement:
[...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [primitiveFunctionPointer := #primitiveInvokeObjectAsMethod]. [...]
So I'd say that both objects as methods and primitives are kind of handled in the same way after?
On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com>
wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
I'll have to give this a try once I've upgraded my machine. I only have GLIBC_2.11 and this requires GLIBC_2.15. Excellent news though! frank On 31 May 2013 14:17, Guillermo Polito <guillermopolito@gmail.com> wrote:
It is fixed in latest vm (which you can get from the zeroconf script http://get.pharo.org/vmLatest) :).
Guille
On Fri, May 31, 2013 at 1:25 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 31 May 2013 09:20, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ahh, that's why the code in CoInterpreter I was looking didn't match the C code :D. Was looking at the wrong place, hehe.
Igor, why do you say that this method should be reached only with vanilla compiled methods? From the comment I understand
"For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
Yes, my bad.. It is hard to see that in code: the logic to handle objects-as-method. So, yes, please fix executNewMethod and internalExecuteNewMethod with this additional check.
And in #addNewMethodToCache: there is as a first statement:
[...] (objectMemory isOopCompiledMethod: newMethod) ifTrue: [primitiveIndex := self primitiveIndexOf: newMethod. primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: class] ifFalse: [primitiveFunctionPointer := #primitiveInvokeObjectAsMethod]. [...]
So I'd say that both objects as methods and primitives are kind of handled in the same way after?
On Fri, May 31, 2013 at 2:27 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 30 May 2013 20:06, Guillermo Polito <guillermopolito@gmail.com> wrote:
Ok, I was playing with flushing caches and stuff... Its still a bit obsure to me why the example in the workspace works and the code coverage doesnot.
However, I managed to hack the VM to make it work :).
It looks like the VM is treating the objects as methods, as cog methods. So I added the following validation in the commonSend:
methodHeader2 = longAt((GIV(newMethod) + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
if (isCogMethodReference(methodHeader2) && isCompiledMethodHeader(methodHeader2)) {
/* begin externalizeIPandSP */
assert((((usqInt)localIP)) != (ceReturnToInterpreterPC()));
GIV(instructionPointer) = oopForPointer(localIP);
GIV(stackPointer) = localSP;
GIV(framePointer) = localFP;
executeCoggedNewMethodmethodHeader(1, methodHeader2);
}
And it works :).
I cc Eliot, so maybe he has an idea...
I touched this code.
Original:
CoInterpreter>>internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly." primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
Now in subclass (NBCoInterpreter) i made this:
internalExecuteNewMethod <inline: true> "For interpreter performance and to ease the objectAsMethod implementation eagerly evaluate the primtiive, i.e. if the method is cogged and has a primitive /do not/ evaluate the machine code primitive, just evaluate primitiveFunctionPointer directly."
| methodHeader |
methodHeader := self rawHeaderOf: newMethod.
(self isCogMethodReference: methodHeader) ifTrue: [ self externalizeIPandSP. self executeCoggedNewMethod: true methodHeader: methodHeader. "we never reach here" ].
primitiveFunctionPointer ~= 0 ifTrue: [| succeeded | self isPrimitiveFunctionPointerAnIndex ifTrue: [^self internalQuickPrimitiveResponse]. "slowPrimitiveResponse may of course context-switch. If so we must reenter the new process appropriately, returning only if we've found an interpreter frame." self externalizeIPandSP. succeeded := self slowPrimitiveResponse. instructionPointer = cogit ceReturnToInterpreterPC ifTrue: [instructionPointer := self iframeSavedIP: framePointer]. self internalizeIPandSP. succeeded ifTrue: [self return: self popStack toExecutive: true. self browserPluginReturnIfNeeded. ^nil]]. "if not primitive, or primitive failed, activate the method" (self methodHasCogMethod: newMethod) ifTrue: [self iframeSavedIP: localFP put: localIP asInteger. instructionPointer := cogit ceReturnToInterpreterPC. self externalizeFPandSP. self activateCoggedNewMethod: true. self internalizeIPandSP] ifFalse: [self internalActivateNewMethod]
=== The intent of change was: - if method is cog method, execute it (the jited code takes care to call primitive, if it there)
The old code logic was: - run primitive if it there - and only then, if no prim/or prim failed, try to run a jited code (but entry point is to the first bytecode of method, not to its start)
This (old) logic prevents from using primitive 220 properly, because it is a "meta-primitive" - a marker that says that given method should: - always be jited - actual primitive is taken by copying machine code from compiled method trailer into CogMethod's primitive section. Therefore executing prim 220 (a C function) ~~ invoking method's primitive (a machine code generated by image).
Still i cannot understand why code reaching this point, when a result of lookup is not a compiled method, but arbitrary object, because everything even in original code says: VM enters this method only if it found 100% vanilla guaranteed CompiledMethod, and not something which pretends to be it. As i understand , the logic to handle object-as-method is in method lookup.. but not in internalExecuteNewMethod, because VM can "execute" the only thing it knows, and it is CompiledMethod.
Your test says, that Cog does something extra (some magic, which i failed to grasp) with object-as-method, like generating special kind of CogMethod which sends #run:as:in: message to it.
I would like to hear Eliot's comments on this.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On 30 May 2013 16:43, Guillermo Polito <guillermopolito@gmail.com> wrote:
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case.
Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars.
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work...
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
So it looks like a problem in the JIT cache not cleared :).
Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P.
You might be onto something there. The only difference between Squeak's and Pharo's TestCoverage is #flushCache. Pharo's says flushCache self reference selector flushCache and Squeak's says flushCache (A no-op.) frank
Guille
On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
On 30 May 2013 21:39, Frank Shearar <frank.shearar@gmail.com> wrote:
On 30 May 2013 16:43, Guillermo Polito <guillermopolito@gmail.com> wrote:
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case.
Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars.
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work...
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
So it looks like a problem in the JIT cache not cleared :).
Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P.
You might be onto something there. The only difference between Squeak's and Pharo's TestCoverage is #flushCache.
Pharo's says
flushCache self reference selector flushCache
and Squeak's says
flushCache
(A no-op.)
Of course, that's not the _whole_ story: making Squeak's flushCache match that of Pharo's doesn't make Cog crash.
frank
Guille
On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
BTW, I was using PharoVM, not Eliot's Cog... What are you using? On Thu, May 30, 2013 at 10:41 PM, Frank Shearar <frank.shearar@gmail.com>wrote:
On 30 May 2013 21:39, Frank Shearar <frank.shearar@gmail.com> wrote:
On 30 May 2013 16:43, Guillermo Polito <guillermopolito@gmail.com> wrote:
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case.
Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars.
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work...
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
So it looks like a problem in the JIT cache not cleared :).
Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P.
You might be onto something there. The only difference between Squeak's and Pharo's TestCoverage is #flushCache.
Pharo's says
flushCache self reference selector flushCache
and Squeak's says
flushCache
(A no-op.)
Of course, that's not the _whole_ story: making Squeak's flushCache match that of Pharo's doesn't make Cog crash.
frank
Guille
On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com
wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n)
TestRunner
0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
A standard Cog r.2714. As far as I understand a PharoVM is just a Cog with a few extra plugins? frank On 30 May 2013 21:43, Guillermo Polito <guillermopolito@gmail.com> wrote:
BTW, I was using PharoVM, not Eliot's Cog... What are you using?
On Thu, May 30, 2013 at 10:41 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
On 30 May 2013 21:39, Frank Shearar <frank.shearar@gmail.com> wrote:
On 30 May 2013 16:43, Guillermo Polito <guillermopolito@gmail.com> wrote:
Yes, this is a problem with Cog and Method wrappers it seems. Camille found not so long ago that when installing a method wrapper with instance variables, the VM just crashes. I think this should be the case.
Anyway, I was just playing a bit because I want to use method wrappers for some experiments. So, the following looks like working when using wrappers with no inst vars.
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapper new. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
Doing the same with a wrapper with inst vars just crashes the vm. However, if flushing the method cache after installing the method in the method dictionary, makes it work...
method := MyA>>#a. [ MyA methodDictionary at: #a put: MyWrapperWithInstVar new. method flushCache. anA := MyA new. res := anA a. ] ensure: [ MyA methodDictionary at: #a put: method. method flushCache. ]. res
So it looks like a problem in the JIT cache not cleared :).
Now, I was looking at the TestCoverage class, to see how to make it work, but not results yet :P.
You might be onto something there. The only difference between Squeak's and Pharo's TestCoverage is #flushCache.
Pharo's says
flushCache self reference selector flushCache
and Squeak's says
flushCache
(A no-op.)
Of course, that's not the _whole_ story: making Squeak's flushCache match that of Pharo's doesn't make Cog crash.
frank
Guille
On Sun, May 26, 2013 at 6:48 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
Hi Frank, I'm not able to reproduce this. I'm running Pharo.image and selecting FileSystemHandleTest FileHandleTest FileSystemResolverTest FileSystemTest DiskFileSystemTest (Disc please!!) MemoryFileSystemTest FileSystemTreeTest MCFileInTest and running both the 2714 Mac VM from my site and a 2723 VM (my latest, very close to 2714). No crash. What am I doing wrong? On Sun, May 26, 2013 at 9:48 AM, Frank Shearar <frank.shearar@gmail.com>wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
-- best, Eliot
On 30 May 2013 22:59, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Frank,
I'm not able to reproduce this. I'm running Pharo.image and selecting FileSystemHandleTest FileHandleTest FileSystemResolverTest FileSystemTest DiskFileSystemTest (Disc please!!) MemoryFileSystemTest FileSystemTreeTest MCFileInTest
and running both the 2714 Mac VM from my site and a 2723 VM (my latest, very close to 2714). No crash. What am I doing wrong?
Hi Eliot, I'm running a Pharo 3 image off a Pharo 3 VM. I _did_ neglect to mention the OS - it's Ubuntu Lucid Lynx on a 32 bit machine. frank
On Sun, May 26, 2013 at 9:48 AM, Frank Shearar <frank.shearar@gmail.com> wrote:
Hi,
I wanted to see FileSystem's coverage, so I * downloaded 3.0 via curl http://get.pharo.org/30+vm | bash, * fired up the image, * opened the TestRunner, * highlighted the three FileSystem packages, * "select all"ed, * pressed "Run Coverage"
and the VM crashed with a segfault. I tried with a few other packages, and every time I tried to run coverage the VM died with the same message:
Segmentation fault Sun May 26 15:46:45 2013
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3 Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013 Revision: git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm@gmail.com> Jenkins build #14535 Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux plugin path: /home/frank/Downloads/pharo-3.0/pharo-vm/ [default: /home/frank/Downloads/pharo-3.0/pharo-vm/]
C stack backtrace: pharo-vm/pharo[0x80a0c0c] pharo-vm/pharo[0x80a0f28] [0x408410] [0x77744f1e] [0x777447c8] [0x7819010f] [0x777454f9] [0x777447c8] [0x7818e112] [0x777fc687] [0x777456ea] [0x77744668]
Smalltalk stack dump: 0xbfc98e4c I [] in InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98e6c M BlockClosure>ensure: 0x78fa4c34: a(n) BlockClosure 0xbfc98e90 I InteractiveResolverTest(TestCase)>runCase 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98eb4 I [] in TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98ed0 M BlockClosure>on:do: 0x78fa4a30: a(n) BlockClosure 0xbfc98ef8 I TestResult>runCase: 0x78f0bdcc: a(n) TestResult 0xbfc98f1c I InteractiveResolverTest(TestCase)>run: 0x78f0bfc8: a(n) InteractiveResolverTest 0xbfc98f3c M [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc98f5c M OrderedCollection>do: 0x78f0bfdc: a(n) OrderedCollection 0xbfc9fdf0 I [] in TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe10 M BlockClosure>ensure: 0x78fa48e4: a(n) BlockClosure 0xbfc9fe34 I TestSuite>run: 0x78f0bfb0: a(n) TestSuite 0xbfc9fe58 I [] in TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9fe80 I BlockClosure>cull:cull: 0x78f9c050: a(n) BlockClosure 0xbfc9feb0 I [] in TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9fed0 M BlockClosure>ensure: 0x78f9c420: a(n) BlockClosure 0xbfc9fef4 I TestRunner>executeSuite:as: 0x78e405bc: a(n) TestRunner 0xbfc9ff1c I TestRunner>runSuite: 0x78e405bc: a(n) TestRunner 0xbfc9ff3c M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc9ff5c M BlockClosure>ensure: 0x78f9bfcc: a(n) BlockClosure 0xbfc97e54 M [] in TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97e74 M BlockClosure>ensure: 0x78f0dd7c: a(n) BlockClosure 0xbfc97ea8 I BlockClosure>valueUnpreemptively 0x78f0dd7c: a(n) BlockClosure 0xbfc97ed4 I TestRunner>collectCoverageFor: 0x78e405bc: a(n) TestRunner 0xbfc97ef8 M TestRunner>runCoverage 0x78e405bc: a(n) TestRunner 0xbfc97f18 I PluggableButtonMorph>performAction: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f38 M [] in PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc97f5c M Array(SequenceableCollection)>do: 0x78ed9f14: a(n) Array 0xbfc93e08 M PluggableButtonMorph>mouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e28 M PluggableButtonMorph(Morph)>handleMouseUp: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e44 M MouseButtonEvent>sentTo: 0x78ed9eec: a(n) MouseButtonEvent 0xbfc93e60 M PluggableButtonMorph(Morph)>handleEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93e7c M PluggableButtonMorph(Morph)>handleFocusEvent: 0x78e6c24c: a(n) PluggableButtonMorph 0xbfc93ea4 M [] in HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93ec0 M [] in PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93edc M BlockClosure>on:do: 0x78ed9e5c: a(n) BlockClosure 0xbfc93f08 M PasteUpMorph>becomeActiveDuring: 0x7796b824: a(n) PasteUpMorph 0xbfc93f2c M HandMorph>sendFocusEvent:to:clear: 0x77b1c270: a(n) HandMorph 0xbfc93f54 M HandMorph>sendEvent:focus:clear: 0x77b1c270: a(n) HandMorph 0xbfc92e44 M HandMorph>sendMouseEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e68 M HandMorph>handleEvent: 0x77b1c270: a(n) HandMorph 0xbfc92e94 M HandMorph>processEvents 0x77b1c270: a(n) HandMorph 0xbfc92eac M [] in WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92ed0 M Array(SequenceableCollection)>do: 0x77846894: a(n) Array 0xbfc92eec M WorldState>handsDo: 0x7797ab44: a(n) WorldState 0xbfc92f08 M WorldState>doOneCycleNowFor: 0x7797ab44: a(n) WorldState 0xbfc92f24 M WorldState>doOneCycleFor: 0x7797ab44: a(n) WorldState 0xbfc92f40 M PasteUpMorph>doOneCycle 0x7796b824: a(n) PasteUpMorph 0xbfc92f60 I [] in MorphicUIManager>? 0x7797ebd4: a(n) MorphicUIManager 0x77c9891c s [] in BlockClosure>?
Most recent primitives class class class class class class class
-- best, Eliot
participants (4)
-
Eliot Miranda -
Frank Shearar -
Guillermo Polito -
Igor Stasenko