<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">Still hoping to debug this in Smalltalk, I'm
exploring the bounds a bit.<br>
<br>
for<br>
</font><font face="Georgia">Smalltalk installLowSpaceWatcher;
useUpMemory<br>
<br>
I tried increasing the </font><font face="Georgia">lowSpaceThreshold
in case that was the reason I was not getting a low space log. The
nominal size (200k) and 300k both lead to vm crashes. Larger
numbers cause the vm to spend forever in garbage collection (well,
15 minutes at least)</font><br>
<font face="Georgia"><br>
10M hangs at 476M real<br>
1M hangs at 490M real<br>
400K hangs at 491.5M real<br>
300K ==crashes VM at 499M real (approximate)<br>
200K ==crashes VM<br>
</font><font face="Georgia">--------------------------------------------------------------------------------------<br>
repeating the experiment for<br>
</font><font face="Georgia">Smalltalk installLowSpaceWatcher;
useUpMemoryWithContexts<br>
<br>
<br>
had similar results although the crash-to-hang threshold was a bit
higher<br>
</font><font face="Georgia">12M hangs at 493M real<br>
1M ==crashesVM around 508M real<br>
600K ==crashesVM around 507M real<br>
400K ==crashesVM around 508M real<br>
200K ==crashes VM<br>
<br>
</font><font face="Georgia"><br>
------------------------------------------------------------------------------------<br>
The interesting thing about this test is that it get a low space
debugger, but not where the code expects it. The error is
signalled when allocating the String, not the Arrays.<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays ==
produces low space debugger<br>
<br>
</font><font face="Georgia">------------------------------------------------------------------------------------<br>
So, I made a slightly different version that allocates a slightly
smaller, but still huge String and then allocates Arrays of a
particular size. It appears that for smaller array sizes, the vm
hangs, while for larger sizes, it will signal low space.<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays: 100 --
hangs at 509M<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays: 300 --
hangs at 509M<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays: 500 --
hangs at 515M<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays: 700 --
low space at 509M<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays: 1000 --
low space at 509M<br>
<br>
============<br>
useUpMemoryWithArrays: arraySize <br>
<br>
| b bytesLeft lsp req count |<br>
<br>
req _ (bytesLeft _ self bytesLeft) - (lsp _ self
lowSpaceThreshold) - (20*1024*1024).<br>
count _ 50000000 // arraySize // 4.<br>
Transcript<br>
show: bytesLeft asStringWithCommas,' bytesLeft(before)';
cr;<br>
show: lsp asStringWithCommas,' lowSpaceThreshold'; cr;<br>
show: req asStringWithCommas,' string size requested'; cr;<br>
show: count asStringWithCommas,' Arrays to be requested';
cr;<br>
show: arraySize asStringWithCommas,' Array size
requested'; cr;<br>
yourself.<br>
self confirm: 'ready to allocate the string'.<br>
b := String new: req.<br>
self confirm: 'we got the string ',b size asStringWithCommas.<br>
<br>
(1 to: count) collect: [:i | Array new: arraySize].<br>
<br>
self confirm: 'oops! no problems detected'.<br>
=============<br>
<br>
--------------------------------------------------------------------------------------<br>
</font><br>
On 1/19/12 10:26 AM, Bob Arning wrote:
<blockquote cite="mid:4F18360B.4030906@comcast.net" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<font face="Georgia">A little more info...<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemory == crashes VM<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithArrays ==
produces low space debugger<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithContexts ==
crashes VM<br>
<br>
Smalltalk installLowSpaceWatcher; useUpMemoryWithTinyObjects ==
produces low space debugger<br>
<br>
Cheers,<br>
Bob<br>
</font><br>
On 1/19/12 8:12 AM, Bob Arning wrote:
<blockquote cite="mid:4F1816C3.8070603@comcast.net" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<font face="Georgia">A little more info on these crashes:<br>
<br>
I had 4 crashes in the space of about 5 days, then none for 10
days, then another today. This time I happened to be looking
at Squeak and noticed that it was no longer writing simulation
results to the screen. It was sluggish to come to the front
and would not accept CMD-period. Looking in Activity Monitor,
real memory usage had gone from the normal 210M to 510M and it
seemed to spend about 10 minutes in gargage collection before
crashing completely. Any thoughts on how to debug this?<br>
<br>
Cheers,<br>
Bob<br>
<br>
<br>
===this is what Activity Monitor saw happening (repeated as
often as I chose to sample it)===<br>
Sampling process 306 for 3 seconds with 1 millisecond of run
time between samples<br>
Sampling completed, processing symbols...<br>
Analysis of sampling Croquet (pid 306) every 1 millisecond<br>
Call graph:<br>
2506 Thread_2507<br>
2506 start<br>
2506 main<br>
2506 RunApplicationEventLoopWithSqueak<br>
2506 RunApplicationEventLoop<br>
2506 ToolboxEventDispatcher<br>
2506 SendEventToEventTarget<br>
2506
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*)<br>
2506
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*,
HandlerCallRec*)<br>
2506
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*)<br>
2506 SendEventToEventTargetWithOptions<br>
2506
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*)<br>
2506
DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*,
HandlerCallRec*)<br>
2506 EventLoopEventHandler<br>
2506
initStackPagesAndInterpret<br>
2506 0x906dd9c<br>
2506
ceSendFromInLineCacheMiss<br>
2505 executeNewMethod<br>
2505 primitiveNew<br>
2505
sufficientSpaceAfterGC<br>
2497 fullGC<br>
1260 markPhase<br>
688
markAndTraceStackPage<br>
688
markAndTrace<br>
688
markAndTrace<br>
566
markAndTraceInterpreterOops<br>
566
markAndTraceStackPage<br>
566
markAndTrace<br>
566
markAndTrace<br>
6
markAndTraceObjectsOrFreeMachineCode<br>
6
markAndTraceOrFreeCogMethodfirstVisit<br>
5
markLiteralsAndUnlinkIfUnmarkedSendpcmethod<br>
3
markAndTraceOrFreeCogMethodfirstVisit<br>
3
markLiteralsAndUnlinkIfUnmarkedSendpcmethod<br>
3
markAndTraceOrFreeCogMethodfirstVisit<br>
2
markLiteralsAndUnlinkIfUnmarkedSendpcmethod<br>
2 markAndTraceOrFreeCogMethodfirstVisit<br>
2 markLiteralsAndUnlinkIfUnmarkedSendpcmethod<br>
1 markAndTraceOrFreeCogMethodfirstVisit<br>
1 markAndTraceOrFreeCogMethodfirstVisit<br>
1 markLiteralsAndUnlinkIfUnmarkedSendpcmethod<br>
1
startOfMemory<br>
1 startOfMemory<br>
2
markAndTrace<br>
2
markAndTrace<br>
1
markAndTraceOrFreeCogMethodfirstVisit<br>
800 incCompBody<br>
800
mapPointersInObjectsFromto<br>
797
mapPointersInObjectsFromto<br>
3
mapObjectReferencesInMachineCode<br>
2 remap<br>
2 remap<br>
1
remapIfObjectRefpchasYoung<br>
1 remap<br>
1
remap<br>
432 fullGC<br>
5
finalizeReference<br>
5
finalizeReference<br>
8 incrementalGC<br>
8 markPhase<br>
8
markAndTraceInterpreterOops<br>
7
markAndTraceStackPage<br>
6
markAndTrace<br>
6
markAndTrace<br>
1
markAndTraceStackPage<br>
1
markAndTraceInterpreterOops<br>
1
activateCoggedNewMethod<br>
1
checkForEventsMayContextSwitch<br>
1 ioProcessEvents<br>
1 ReceiveNextEvent<br>
1
ReceiveNextEventCommon<br>
1
RunCurrentEventLoopInMode<br>
1
CFStringCompare<br>
1
CFStringCompareWithOptions<br>
1
CFStringCompareWithOptionsAndLocale<br>
1
CFUniCharGetBitmapPtrForPlane<br>
1
CFUniCharGetBitmapPtrForPlane<br>
2506 Thread_2603<br>
2506 thread_start<br>
2506 _pthread_start<br>
2506 beatStateMachine<br>
2487 __semwait_signal<br>
2487 __semwait_signal<br>
11 nanosleep$UNIX2003<br>
10 clock_get_time<br>
10 mach_msg<br>
10 mach_msg_trap<br>
10 mach_msg_trap<br>
1 nanosleep$UNIX2003<br>
2 __udivdi3<br>
2 __udivdi3<br>
2 beatStateMachine<br>
2 cerror<br>
2 __error<br>
2 __error<br>
1 __error<br>
1 __error<br>
1 forceInterruptCheckFromHeartbeat<br>
1 forceInterruptCheckFromHeartbeat<br>
<br>
Total number in stack (recursive counted multiple, when
>=5):<br>
5 markAndTraceOrFreeCogMethodfirstVisit<br>
<br>
Sort by top of stack, same collapsed (when >= 5):<br>
__semwait_signal 2487<br>
markAndTrace 1262<br>
mapPointersInObjectsFromto 797<br>
fullGC 432<br>
mach_msg_trap 10<br>
finalizeReference 5<br>
Sample analysis of process 306 written to file /dev/stdout<br>
<br>
===this appeared on the console===<br>
</font>Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: out of memory<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: C stack backtrace:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: Smalltalk stack dump:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: 0xbffa8308 M Delay
class>handleTimerEvent 157474072: a(n) Delay class<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: 0xbffa8320 M Delay<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: class>runTimerEventLoop
157474072: a(n) Delay class<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: 0x9851140 s [] in Delay
class>startTimerEventLoop<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: 0x9851260 s [] in
BlockClosure>newProcess<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: Most recent primitives<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: basicNew<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: basicNew<br>
...repeated items snipped...<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: primSignal:atMilliseconds:<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: millisecondClockValue<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: wait<br>
Jan 19 07:37:15 robert-arnings-computer
[0x0-0x25025].com.squeak.Cog[306]: (out of memory)<br>
Jan 19 07:37:19 robert-arnings-computer com.apple.launchd[102]
([0x0-0x25025].com.squeak.Cog[306]): Exited abnormally: Abort
trap<br>
<br>
On 1/9/12 4:05 PM, Eliot Miranda wrote:
<blockquote
cite="mid:CAC20JE2RpdyHoh1M-vtxGU_x1CK6a_jaGhFbHwQQJMkuRxR0Hg@mail.gmail.com"
type="cite">
<pre wrap=""> </pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<br>
<br>
<div class="gmail_quote">On Sun, Jan 8, 2012 at 4:20 PM, Bob
Arning <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:arning315@comcast.net">arning315@comcast.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
<div bgcolor="#FFFFFF" text="#000000"> <font
face="Georgia">Does it take something special to
generate one of those? The most recent I have is 18
months old.<br>
</font></div>
</blockquote>
<div><br>
</div>
<div>They're produced either when the VM experiences a fatal
error (either an internal call of error or catching a
fatal signal etc). How up-to-date is your VM? That
you're seeing messages on the console and not getting a
crash.dmp might indicate your VM is old.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><font face="Georgia">
<br>
Cheers,<br>
Bob<br>
</font><br>
On 1/8/12 6:34 PM, Eliot Miranda wrote:
<blockquote type="cite">
<pre> </pre>
<br>
<fieldset></fieldset>
<br>
<br>
<br>
<div class="gmail_quote">On Sat, Jan 7, 2012 at 6:22
PM, Bob Arning <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:arning315@comcast.net"
target="_blank">arning315@comcast.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<div bgcolor="#FFFFFF" text="#000000"> <font
face="Georgia">Is that the first file I
posted, or yet another file? I looked and did
not see anything specifically named
"crash.log"<br>
</font></div>
</blockquote>
<div><br>
</div>
<div>Oops. It is called crash.dmp and is produced
in whatever the image file's directory is (a poor
choice in certain circumstances, but it has to go
somewhere).</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><font
face="Georgia"> <br>
Cheers,<br>
Bob<br>
</font><br>
On 1/7/12 6:35 PM, Eliot Miranda wrote:
<blockquote type="cite">
<div>BTW, the below is not as useful as the
crash.log file.</div>
<div><br>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
best,
<div>Eliot</div>
<br>
</blockquote>
</div>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
best,
<div>Eliot</div>
<br>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>