[bug] stack overflow crashes Squeak.

Michael Fremont mike at zorch.com
Sun Sep 7 17:15:25 UTC 2003


I've tried Avi's code; it's really nice, simple code.  Unfortunately, 
on very fast machines on Unix, it gets into some kind of infinite 
loop of error notifications that cause the Emergency Evaluator to pop 
up when you test it with:

Smalltalk createStackOverflow.

The low space watcher has a similar problem.  I've talked with Ian 
Piumarta (the Unix vm developer, he was very helpful) about this, and 
he can reproduce it too; but we don't know what the problem is.  
Here's what he told me:

-------
The low space process tries to open a notifier window using the 
"headroom" memory that's left over, but if this requires more memory 
than is available then you're in trouble.

Exactly why this might require more than the default 200K is a 
mystery, but this seems to be what's happening.  I can reproduce the 
crash reliably in my image using createStackOverflow, which indicates 
a bug somewhere. 
 
The system shouldn't be allocating lots of memory just to pop up a
notifier.  From the VM backtrace it looks like the UI process (which 
is running the recursion) is being reactivated even while the 
low-space notifier is still open on the screen.
------

The same thing happens to me when I set the low-memory threshold even 
at 20 *megabytes*.

Best,

Mike



On Sunday 07 September 2003 09:04 am, Joshua 'Schwa' Gargus wrote:
> Search back through the list archives for the last month or so; I
> think that Avi Bryant took a first cut at something like this.
>
> Joshua
>
> On Sun, Sep 07, 2003 at 06:00:29PM +0200, Michael van der Gulik 
wrote:
> > Hi all.
> >
> > If you make a naive class that calls itself:
> >
> > Forkbomb>>forkbomb
> > 	^ self forkbomb.
> >
> > Squeak 3.5 on Debian linux will eventually crash, leaving a huge
> > stack dump in the terminal.
> >
> > Okay; it's really my fault for making such a stupid class, but
> > I'm playing around with proxied objects, message sends etc and
> > it's happening quite often while I'm debugging.
> >
> > Is there a way to limit the invocation stack to a sane level of
> > deepness, after which a process/thread (whichever is Squeak
> > terminology) gets suspended and an error thrown?
> >
> > Same probably applies to number of processes made by a thread.
> >
> > mikevdg.



More information about the Squeak-dev mailing list