[squeak-dev] Re: Process bug introduced in 3.10

Andreas Raab andreas.raab at gmx.de
Mon Apr 28 03:15:58 UTC 2008


bryce at kampjes.demon.co.uk wrote:
> Squeak stops responding, Alt-. will not recover. It's consuming
> 100% of the CPU but is spending a decent amount of time in the
> idle loop. Alt-. may occasionally pop up a debugger but normally
> the image becomes completely unresponsive. printAllStacks has
> shown over 80 profiling threads running which indicates that
> they are not getting terminated.

Thanks. I think the problem is the simulation of nested unwind blocks. 
Here is an example for the kind of problem:

p1 := [
	(Delay forMilliseconds: 1000) wait.
] forkAt: Processor activePriority+1.
p2 := [ | timout |
	timout := Time millisecondClockValue+1000.
	[[timeout < Time millisecondClockValue] whileTrue]
		ensure:[p1 terminate].
] forkAt: Processor activePriority-1.
(Delay forMilliseconds: 500) wait.
p2 terminate.

For some reason this explodes with a nil DNU: < but I think the root 
cause is the (nested) simulation of unwind handling. And to make things 
more interesting, for some inexplicable reason the simpler variant works 
fine:

p1 := [(Delay forMilliseconds: 1000) wait]
	forkAt: Processor activePriority+1.
p2 := [[[(Delay forMilliseconds: 1000) wait] whileTrue]
	ensure:[p1 terminate]
] forkAt: Processor activePriority-1.
(Delay forMilliseconds: 500) wait.
p2 terminate.

I'm pretty certain this is what you're seeing. The reason it would show 
in 3.10 and not in 3.9 is that in 3.10 Delay>>wait has an unwind protect 
block to ensure that ridiculously long delays that are terminated get 
taken out of the timer queue.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list