memory and VM issues

Ross Boylan RossBoylan at stanfordalumni.org
Sat Jul 23 16:59:07 UTC 2005


Got past some old problems, ran into some new ones.
I first tried with the new VMMaker Time suggested.  That didn't seem
to work, so I tried the old one.  It got further, but also gagged.

Again, this is all on Linux.

On Fri, Jul 22, 2005 at 10:14:36AM -0700, John M McIntosh wrote:
> 
> The Smalltalk recreateSpecialObjectsArray was done as part of  
> Andreas' changes for multiple language
> support, this is already done in 3.8-6665. I suggest removing it to  
> see if the crash you get goes away.
It did.

Here's what I did and what happened:

1. base  Squeak3.8-6665 image.
2. open squeakmap
3. load Balloon3D (1.0.4)
4. load PackageInfo (apparently update from 16->18). It recommends loading Monticello, which I do (v 231).
5. save image (Back1).
6. edit JMMGCMonitor.4.cs and remove "Smalltalk
recreateSpecialObjectsArray." at the bottom.
7. Open Monticello and load VMMaker-tpr.37
8. ObjectMemory(class)>>initializeSpecialObjectIndices does not define
FloatProto.
9. save
10. file in GCInstrumentJMMImprovementsAR.1.cs
Warning: LongSizeMask is still used in code of class ObjectMemory.
Is it oaky to move it to Undeclare? (yes)
same for Byte4Shift, ByteMask(I think), Byte6Mask, Byte3Shift,
Byte5Mask, Byte1ShiftNegated, Size4Bit, WordMask,
ProcessSignalingLowSpace, Byte2Shift, Byte4ShiftNegated, and many more.
11. save.
12. file in JMMGCMonitor.4.cs
13. save.  Yea! No crash.
14. open VMMaker.  Oops, during opening, in
UnixVMMaker(VMMaker)>>initialize, Smalltalk wordsize is not
understood.

I think it's time to try the earlier version of VMMaker.

15. open Monticello, unload VMMaker.
16. load VMMaker 38b4
17. delete FloatProto from ObjectMemory(class)>>initializeSpecialObjectIndices.
18. file in GCInstrumentJMMImprovementsAR.1.cs
19. save.
20. file in JMMGCMonitor.4.cs
21. save.
22. Open VMMaker.  No problem.  Clean out sources.
Make all plugins internal (a few aren't appropriate to platform).
No platform specific files found for 'HostWindowPlugin'
No platform specific files found for 'InternetConfigPlugin'
No platform specific files found for 'MacMenubarPlugin'
No platform specific files found for 'TestOSAPlugin'
No platform specific files found for 'UUIDPlugin'
23. Generate all in VMMaker.
Splat!

MessageNotUnderstood: SmallInteger class>>ccgDeclareCForVar:
23 July 2005 9:48:35 am

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

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

SmallInteger class(Object)>>doesNotUnderstand: #ccgDeclareCForVar:
	Receiver: SmallInteger
	Arguments and temporary variables: 
		aMessage: 	ccgDeclareCForVar: 'fPosition'
	Receiver's instance variables: 
		superclass: 	Integer
		methodDict: 	a MethodDictionary(#as31BitSmallInt->a CompiledMethod (1747) #asFlo...etc...
		format: 	2
		instanceVariables: 	nil
		organization: 	('arithmetic' * + - / // \\ gcd: quo:)
('bit manipulation' bitAnd...etc...
		subclasses: 	nil
		name: 	#SmallInteger
		classPool: 	a Dictionary()
		sharedPools: 	nil
		environment: 	nil
		category: 	nil

[] in SmartSyntaxPluginTMethod>>handlePrimitiveDirective:on: {[:argName :spec | declarations   at: argName   put: (spec ccgDeclareCForVar:...]}
	Arguments and temporary variables: 
		aStmt: 	self primitive: 'primitiveAsyncFileReadStart' parameters: #(#Oop #SmallI...etc...
		sStream: 	a WriteStream #()
		argName: 	'fPosition'
		spec: 	SmallInteger
		expr: 	nil

OrderedCollection(SequenceableCollection)>>with:do:
	Receiver: an OrderedCollection('fHandle' 'fPosition' 'count')
	Arguments and temporary variables: 
		otherCollection: 	#(Oop SmallInteger SmallInteger)
		twoArgBlock: 	[] in SmartSyntaxPluginTMethod>>handlePrimitiveDirective:on: {[:ar...etc...
		index: 	2
		indexLimiT: 	3
	Receiver's instance variables: 
		array: 	#('fHandle' 'fPosition' 'count')
		firstIndex: 	1
		lastIndex: 	3

SmartSyntaxPluginTMethod>>handlePrimitiveDirective:on:
	Receiver: a SmartSyntaxPluginTMethod (primitiveAsyncFileReadStart)
	Arguments and temporary variables: 
		aStmt: 	self primitive: 'primitiveAsyncFileReadStart' parameters: #(#Oop #SmallI...etc...
		sStream: 	a WriteStream #()
		argName: 	'fPosition'
		spec: 	SmallInteger
		expr: 	nil
	Receiver's instance variables: 
		selector: 	#primitiveAsyncFileReadStart
		returnType: 	'int'
		args: 	an OrderedCollection()
		locals: 	an OrderedCollection('f' 'fHandle' 'fPosition' 'count')
		declarations: 	a Dictionary('f'->'AsyncFile *f' 'fHandle'->'int fHandle' )
		primitive: 	0
		parseTree: 	[
	self primitive: 'primitiveAsyncFileReadStart' parameters: #(#Oop ...etc...
		labels: 	an OrderedCollection()
		possibleSideEffectsCache: 	nil
		complete: 	false
		export: 	false
		static: 	true
		sharedLabel: 	nil
		sharedCase: 	nil
		comment: 	nil
		definingClass: 	nil
		globalStructureBuildMethodHasFoo: 	nil
		isPrimitive: 	true
		suppressingFailureGuards: 	false
		fullSelector: 	#primitiveAsyncFileReadStart:fPosition:count:
		fullArgs: 	an OrderedCollection('fHandle' 'fPosition' 'count')
		parmSpecs: 	#(Oop SmallInteger SmallInteger)
		rcvrSpec: 	Oop


--- The full stack ---
SmallInteger class(Object)>>doesNotUnderstand: #ccgDeclareCForVar:
[] in SmartSyntaxPluginTMethod>>handlePrimitiveDirective:on: {[:argName :spec | declarations   at: argName   put: (spec ccgDeclareCForVar:...]}
OrderedCollection(SequenceableCollection)>>with:do:
SmartSyntaxPluginTMethod>>handlePrimitiveDirective:on:
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SmartSyntaxPluginTMethod>>primitiveDirectiveWasHandled:on:
[] in SmartSyntaxPluginTMethod>>extractPrimitiveDirectives {[:stmt | (self primitiveDirectiveWasHandled: stmt on: sStream)   ifFalse: [s...]}
OrderedCollection>>do:
[] in SmartSyntaxPluginTMethod>>extractPrimitiveDirectives {[:sStream | parseTree statements   do: [:stmt | (self primitiveDirectiveWasH...]}
Array class(SequenceableCollection class)>>streamContents:
SmartSyntaxPluginTMethod>>extractPrimitiveDirectives
SmartSyntaxPluginTMethod>>setSelector:args:locals:block:primitive:
MethodNode>>asTranslationMethodOfClass:
[] in SmartSyntaxPluginCodeGenerator(CCodeGenerator)>>addClass: {[:sel :i |  bar value: i.  source := aClass sourceCodeAt: sel.  self   addMe...]}
[] in Set>>doWithIndex: {[:item | aBlock2 value: item value: (index := index + 1)]}
Set>>do:
Set>>doWithIndex:
[] in SmartSyntaxPluginCodeGenerator(CCodeGenerator)>>addClass: {[:bar | aClass selectors   doWithIndex: [:sel :i |     bar value: i.    sour...]}
[] in ProgressInitiationException>>defaultMorphicAction {[result := workBlock value: progress]}
...etc...



More information about the Squeak-dev mailing list