[BUG] User interrupts no longer interrupt locked UI process

Tim Rowledge tim at sumeru.stanford.edu
Fri Mar 19 04:26:20 UTC 2004


Ned Konz <ned at squeakland.org> wrote:

> > but I can't seem to break out of
> >
> >
> > recursionTest
> > 	^self recursionTest
> 
> Well, it appears to be because quickCheckForInterrupts is missing the boat.
> 	interruptCheckCounter is 115411591
> 	interruptCheckCounterFeedbackReset is 116998772
> 
> Though something as simple as causing a checkForInterrupts() after every 
> fullGC() might catch the infinite recursion.
> 
> I tried zeroing interruptCheckCounter after a fullGC() and I could break out 
> of tight recursion.
Good grief - 116 million? Since it starts at 1000 that's an awful lot
of hits on checkForInterrupts and the feedback testing. You have
pretty fast machine so I can see it managing quite a few sends of a 0
arg message per second. Any time through checkForInterrupts less than
interruptChecksEveryNms milliseconds after the last time you get
another 10 on your reset value, so I imagine this will build quite
quickly at first. Then you'll get to a GC which will probably trigger
the timer related call to cFI as well. Back to recursing some more,
adding 10 every now and then, and more GCs. It's really hard to see how
you can reach 116M - after all interruptChecksEveryNms is 3 in the
current VMs and if you reach any kind of steady state you should be
decrementing interruptCheckCounter for each real send, hitting cFI when
that reaches 0, testing to see if the last bunch took less than 3mS and
if :-
yes, add 10 to interruptCheckCounterFeedBackReset
no,  subtract 12.
So you ought surely end up occasionally adding and occasionally
subtracting around an equilibrium position. And I really doubt that it
could be 116M sends per 3mS even on the hottest current machines!

By zeroing interruptCheckCounter you may be causing extra hits on cFI
and thereby bumping up the reset value. Takes a lot of +10's to get to
116million though....

On my machine I get an out of memory after half a million or so
recursions anyway, with an at-exit interruptCheckCounter of 0 and a
reset of 700,000 or so. Funny thing is I seem to be getting calls to
cFI about every mS and by and large the reset value is going up by 10
per hit. There _are_ occasions when there must have been a -12 or two.

Worse yet, there is supposed to be a call to ioProcessEvents every 500
mS or so even if there is no call to ioGetEvents from the image - which
ought to pick up any press of the interrupt key.  It looks like I'm
getting those calls ok even in the depths of the recurse BUT I don't
pick up the blasted interrupt key!

I've _once_ seen a low space notifier, after which no button/key
presses seem to have any effect. I rather think we should always get
one for an infinite recursion.

I have tried with and without explicitly installing the
interruptwatcher with no difference. And to make things worse right now
I don't actually get even a vm crash when it runs out of memory...

Getting silly.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Attitudes are contagious. Mine might kill you



More information about the Squeak-dev mailing list