memory and VM issues

Ross Boylan RossBoylan at stanfordalumni.org
Thu Jul 21 16:26:42 UTC 2005


After doing all steps up til the VMMaker run I attempted to save and
the image hung.  Details below.

On Wed, Jul 20, 2005 at 11:30:46PM -0700, John M McIntosh wrote:
> 
> On 20-Jul-05, at 5:27 PM, John M McIntosh wrote:
> 
> >I'm looking at taking the Squeak3.8-6665-basic.zip from the ftp  
> >site, loading in the latest published VMMaker  via squeakmap and
> >applying the GCInstrumentJMMImprovementsAR.1.cs  and JMMGCMonitor. 
> >4.cs from ftp.smalltalkconsulting.com/squeakGarbage/
> >and grabbing the 1100 source tree. Then seeing if I can make it all  
> >work. So hang on a moment
> 
> Ok, I did the following
> a) Use SVN and get the source tree upto revision 1100
> b) Grab  Squeak3.8-6665-basic.zip  from ftp.squeak.org
> c) Unpacked started up and invoked Squeakmap
> d) load Balloon3D
I loaded Balloon3D, though I had already loaded VMMaker.
> e) load VMMaker 3.8b3, then apply these vmmaker fixes:
> f) MessageNode>>asTranslatorNode
> 
>     sel _ (selector isMemberOf: Symbol) ifTrue: [selector] ifFalse:  
> [selector key].
> 
> to
> 
>     sel _ (selector isSymbol) ifTrue: [selector] ifFalse: [selector  
> key].
That's likely the cause of the error I reported in my initial attempt.
> 
> g) MiscPrimitivePlugin>> translatedPrimitives  Should read:
>     "an assorted list of various primitives"
>     ^#(
>         (Bitmap compress:toByteArray:)
>         (Bitmap decompress:fromByteArray:at:)
>         (Bitmap encodeBytesOf:in:at:)
>         (Bitmap encodeInt:in:at:)
>         (ByteString compare:with:collated:)
>         (ByteString translate:from:to:table:)
>         (ByteString findFirstInString:inSet:startingAt:)
>         (ByteString indexOfAscii:inString:startingAt:)
>         (ByteString findSubstring:in:startingAt:matchTable:)
>         (ByteArray hashBytes:startingWith:)
>         (SampledSound convert8bitSignedFrom:to16Bit:)
>     )
> 
I made this replacement, though I didn't notice any change from the
existing method definition.

> h) If you want to instrument the VM for GC statistics,
>     you can load GCInstrumentJMMImprovementsAR.1.cs and JMMGCMonitor. 
> 4.cs from ftp.smalltalkconsulting.com
Ah! I thought these were for after the build.  Two issues:
On file in of GCInstrument... I got a warning about moving a method to
underfined, though it was still in use.  I think it was
proto.... (sorry, didn't write it down, and forgot in the later
excitement).

Second, I'll actually be using this in the image that is giving me
troubles, which is 3.6 era.  If I file JMMGCMonitor there, and use the
new VM, should that work.

After doing all that I attempted to save the image.  I got the
"Error: a primitive has failed".  Debug log attached.  I hit debug on
the resulting panel, but got no response.  The image was hung up using
alll CPU (roughly half user, half system).  Alt-. didn't help.

> 
> i) Open VMMaker and build the VM with plugins you want.

-------------- next part --------------
Error: a primitive has failed
21 July 2005 9:14:11 am

VM:  - a SmalltalkImage
Image: Squeak3.8 [latest update: #6665]

SecurityManager state:
Restricted: false
FileAccess: true
SocketAccess: true
Working Dir /usr/local/src/squeak
Trusted Dir 
Untrusted Dir 

ByteString class(Object)>>error:
	Receiver: ByteString
	Arguments and temporary variables: 
		t1: 	'a primitive has failed'
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->a CompiledMethod (510) #asOctetStr...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize replaceFrom...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	nil

ByteString class(Object)>>primitiveFailed
	Receiver: ByteString
	Arguments and temporary variables: 

	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->a CompiledMethod (510) #asOctetStr...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize replaceFrom...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	nil

ByteString class(Behavior)>>basicNew:
	Receiver: ByteString
	Arguments and temporary variables: 
		t1: 	-6
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->a CompiledMethod (510) #asOctetStr...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize replaceFrom...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	nil

ByteString class(String class)>>new:
	Receiver: ByteString
	Arguments and temporary variables: 
		t1: 	-6
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->a CompiledMethod (510) #asOctetStr...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize replaceFrom...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	nil


--- The full stack ---
ByteString class(Object)>>error:
ByteString class(Object)>>primitiveFailed
ByteString class(Behavior)>>basicNew:
ByteString class(String class)>>new:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ByteString(SequenceableCollection)>>copyFrom:to:
ImageSegment class>>folder
ImageSegment class>>reclaimObsoleteSegmentFiles
[] in SmalltalkImage>>snapshot:andQuit:embedded: {[:t7 | t7 reclaimObsoleteSegmentFiles]}
SystemDictionary(Dictionary)>>at:ifPresent:
SmalltalkImage>>snapshot:andQuit:embedded:
SmalltalkImage>>snapshot:andQuit:
SmalltalkImage>>saveSession
TheWorldMenu>>doMenuItem:with:
[] in MenuItemMorph>>invokeWithEvent: {[(t2 := selector numArgs) = 0   ifTrue: [target perform: selector]   ifFalse...]}
BlockContext>>ensure:
CursorWithMask(Cursor)>>showWhile:
MenuItemMorph>>invokeWithEvent:
MenuItemMorph>>mouseUp:
MenuItemMorph>>handleMouseUp:
MouseButtonEvent>>sentTo:
MenuItemMorph(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuItemMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>dispatchEvent:with:
MenuMorph(Morph)>>processEvent:using:
MenuMorph(Morph)>>processEvent:
MenuMorph>>handleFocusEvent:
[] in HandMorph>>sendFocusEvent:to:clear: {[ActiveHand := self.  ActiveEvent := t1.  t4 := t2     handleFocusEvent: (t1...]}
[] in PasteUpMorph>>becomeActiveDuring: {[t1 value]}
BlockContext>>on:do:
PasteUpMorph>>becomeActiveDuring:
HandMorph>>sendFocusEvent:to:clear:
HandMorph>>sendEvent:focus:clear:
HandMorph>>sendMouseEvent:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in WorldState>>doOneCycleNowFor: {[:t3 |  ActiveHand := t3.  t3 processEvents.  t2 := t2     or: [t3 isCapturi...]}
Array(SequenceableCollection)>>do:
WorldState>>handsDo:
WorldState>>doOneCycleNowFor:
...etc...


More information about the Squeak-dev mailing list