memory and VM issues

Ross Boylan RossBoylan at stanfordalumni.org
Thu Jul 14 18:41:54 UTC 2005


[Taking this onlist, as it may interest someone other than us.]

Dear List,

The message below describes a couple of issues growing out of my
problems with high memory/CPU useage.  The original problems led to
the advice to try some diagnostics with a newer VM (I think also with
the suggestion that a newer VM might solve the problem).  The first
problem is that getting such a VM for Linux is proving not
straightforward.  The second issue is that there are a few more memory
oddities to report, and apparently some issues with Linux 2.6 kernels.

VM
--
On Thu, Jul 14, 2005 at 08:44:29AM -0500, Lex Spoon wrote:
> Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
> > > 3.8a1 is the newest VM version that Ian has made a tarball for, that I
> > > know of, and that is available in the apt repository on
> > > box1.squeakfoundation.org.  Do these folks recommend you use something
> > > newer than that, e.g. that you use a VM based on the latest version of
> > > VMMaker?
> > The instructions (which are oriented to the Mac) say use "Squeak
> > 3.8.6Beta4.app or higher, or any VM created in june/july of 2005
> > using the latest VMMaker."  This is after the date of Debian VM.
> 
> Okay, so there's no tarball, but a new version is available.  Not
> surprising -- 3.8a1 has been out for a while at this point.
> 
> To be honest, I don't know when I will have a chance to look at this....
>  If it's easy, I can upload a new deb no problem.  But I may need to
> poke around some.  In particular, I'm a bit confused about the overall
> VM situation at this point.  There seem to be a lot of versions
> nowadays.  (This is a major bonus of using Ian's tarballs--I can ride on
> his decisions!)

Can anyone say anything authoritative about "official" VMs, especially
for Linux?


MEMORY
------
[Lex]
> > > I am having one problem with this VM version on a 2.6.x kernel:
> > > sometimes it will freeze completely.  However, if I run squeak with
> > > "-memory 100m" as an argument, then the lock ups stop.  It is a pity to
> > > run this way, but it does work around the one major problem I know of. 
> > > Maybe that helps you?
> > 
[Ross]
> > I'm on a 2.4 kernel.  I'm seeing surprisingly high memory use (40Mg
> > image on disk, 1000Mg reported RAM use) and persistent high CPU use
> > until I do a save (but low reported time doing anything according to
> > squeak's debugger).
> 
[Lex]
> I've seen weird high CPU usages from Squeak lately, too.  I find that
> hitting alt-period a few times in a row will often fix it; I have never
> tried saving.
> 
> On the high RAM reporting, is it possible you compiled your kernel to
> use a strict memory allocator and pre-allocate memory for pages that
> haven't been touched yet?  At any rate, running with "-memory 100m"
> should put a strict limit on the memory used, if it is becoming a
> problem.
> 
I didn't fiddle with any options about memory allocation, and it seems
likely I am not getting this behavior.  I believe that with the
virtual memory size on my system it would be out of room if it
actually allocated 1G for squeak.

Unfortunately, when I try running with either 100m or 300m fixed size,
I get an error.  Since I'm constraining it to less memory than it
"wants" to use (though more than I think it should need), this
probably isn't a bug.  Perhaps it's a clue?  Here's the error:

Error: subscript is out of bounds: 0
14 July 2005 11:21:15 am

VM: unix - Squeak3.8gamma of '24 November 2004' [latest update: #6548]
Image: Squeak3.2 [latest update: #4956]

Array(Object)>>error:
	Receiver: #(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
	Arguments and temporary variables: 
		aString: 	'subscript is out of bounds: 0'
	Receiver's instance variables: 
#(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
Array(Object)>>errorSubscriptBounds:
	Receiver: #(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
	Arguments and temporary variables: 
		index: 	0
	Receiver's instance variables: 
#(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
Array(Object)>>at:
	Receiver: #(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
	Arguments and temporary variables: 
		index: 	0
	Receiver's instance variables: 
#(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xDelimiter #xDe...etc...
Parser(Scanner)>>xBinary
	Receiver: a Parser
	Arguments and temporary variables: 

	Receiver's instance variables: 
		source: 	a ReadStream
		mark: 	2
		hereChar: 	$ 
		aheadChar: 	$ 
		token: 	#
		tokenType: 	#binary
		currentComment: 	nil
		buffer: 	a WriteStream
		typeTable: 	#(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xB...etc...
		here: 	'f'
		hereType: 	#word
		hereMark: 	1
		hereEnd: 	1
		prevMark: 	1
		prevEnd: 	nil
		encoder: 	nil
		requestor: 	nil
		parseNode: 	nil
		failBlock: 	[] in Parser>>parse:class:noPattern:context:notifying:ifFail:
		requestorOffset: 	0
		tempsMark: 	nil
		doitFlag: 	nil

--- The rest of the stack ---
Parser(Scanner)>>scanToken
Parser>>advance
Parser>>init:notifying:failBlock:
Parser>>parse:class:noPattern:context:notifying:ifFail:
Compiler>>translate:noPattern:ifFail:
Compiler>>evaluate:in:to:notifying:ifFail:
Compiler class>>evaluate:for:notifying:logged:
Compiler class>>evaluate:for:logged:
Compiler class>>evaluate:logged:
[] in RWBinaryOrTextStream(PositionableStream)>>fileInAnnouncing:
BlockContext>>on:do:
[] in RWBinaryOrTextStream(PositionableStream)>>fileInAnnouncing:
ProgressInitiationException>>defaultAction
ProgressInitiationException(Exception)>>signal
ProgressInitiationException>>display:at:from:to:during:
ProgressInitiationException class>>display:at:from:to:during:
String>>displayProgressAt:from:to:during:
RWBinaryOrTextStream(PositionableStream)>>fileInAnnouncing:
RWBinaryOrTextStream(PositionableStream)>>fileIn
CodeLoader>>installSourceFile:
[] in CodeLoader>>installSourceFiles
Array(SequenceableCollection)>>do:
CodeLoader>>installSourceFiles
ProjectLauncher>>startUpAfterLogin
ProjectLauncher>>startUp
[] in AutoStart class>>startUp
WorldState>>runStepMethodsIn:
PasteUpMorph>>runStepMethods
WorldState>>doOneCycleNowFor:
WorldState>>doOneCycleFor:
PasteUpMorph>>doOneCycle
[] in Project class>>spawnNewProcess
[] in BlockContext>>newProcess


Ross Boylan



More information about the Squeak-dev mailing list