Uninterruptable Squeak

Doug Way dway at riskmetrics.com
Thu Mar 8 06:01:06 UTC 2001


Sven wrote:
> 
> Hi everyone.  I have no idea how, but my image is using all of my
> processor and multiple "user interrupts" seem to have no effect.  There
> is essentially no reaction to my input ( except for alt-. ).

I've had this sort of thing happen to me on occasion... a situation in which Squeak mostly seems frozen (it doesn't accept any mouse clicks), but alt-. (cmd-.) does bring up a pre-debug window, but then it's not possible to click on the Abandon or Debug or any buttons in the pre-debug window.  Continuing to hit alt-. brings up more pre-debug windows, but none of them can be clicked on.

Actually, this situation is very easy to reproduce.  Just execute the following (if you don't mind your image being hosed):

[[true] whileTrue: [10 factorial]] forkAt: 5.

It would be nice if there were some way to save yourself in this situation.  I haven't dealt enough with Processes to know what the best solution would be.  There might be a way for Squeak to interrupt a runaway high priority process when alt-. is pressed... perhaps if alt-. were pressed, it could check to see if "nothing" was happening in the UI process, and then interrupt remaining higher priority processes (that weren't any of the standard high priority system processes).  Although this may have bad effects.  Or, if Squeak could detect which high priority process was eating most of the CPU (through some sort of sampling), it could interrupt that one.

Another solution might be to have a key combination which brings up the emergency evaluator.  But I think this is less ideal than getting something to work with alt-. , since it would be tough for most people to figure out how to stop the runaway process from the evaluator.

> Even if I
> could
> 
> "Process allInstances explore" how would I see what percent of the CPU a
> certain process is using so as to terminate the runaway?

Under more normal circumstances, you can use the Process Browser to look at various processes and terminate them.  (This is new in 2.9/3.0... look under the "debug..." menu.)

The Process Browser doesn't show what percent CPU a process is using, though... that would be cool.  I wonder if it would be possible to implement this via some sort of sampling, kind of like what MessageTally does?  (Although I guess MessageTally only has to worry about one process?)  Even if it worked, it would probably need to be an optional feature, kind of like the auto-update feature in the Process Browser.

> Any way out of this?

Not yet. :)

- Doug Way
  dway at riskmetrics.com





More information about the Squeak-dev mailing list