Bryce which version of 3.9? The latest I created with the fixes of andreas? 3.9.1 or the one before, because I have the impression that the latest 3.9.1 has the same fixes than 3.10. So may be there is a problem with the fixes I harvested too. Can you check? I'm travelling right now.
Stef
On Apr 27, 2008, at 9:19 PM, bryce@kampjes.demon.co.uk <bryce@kampjes.demon.co.uk
wrote:
Andreas Raab writes:
bryce@kampjes.demon.co.uk wrote:
My next attempt at formulating a version of the same bug that'll run in a vanilla 3.10 image is:
100 timesRepeat: [processes := (1 to: 10) collect: [:each| [[(MessageTally new spyEvery: 1 on: [(Delay forMilliseconds: 500) wait]) ] repeat] fork ]. (Delay forSeconds: 1) wait. processes do: [:each| each terminate].]
Running MessageTallies concurrently is a big, big no-no. Check out class MessageTally and in particular its (shared) class variables ObservedProcess and Timer.
Good point, but I can reproduce the bug without using MessageTally or any class variables. ExuperyProfiler doesn't use class variables.
The following will reproduce it: TestProfiler>>spyOn: aBlock | myDelay millisecs timer | millisecs := 1. (aBlock isMemberOf: BlockContext) ifFalse: [self error: 'spy needs a block here']. myDelay := Delay forMilliseconds: millisecs. timer := [[true] whileTrue: [myDelay wait]. nil] newProcess. timer priority: Processor userInterruptPriority. "activate the probe and evaluate the block" timer resume. aBlock ensure: [timer terminate]. ^ self
100 timesRepeat: [processes := (1 to: 10) collect: [:each| [[(TestProfiler new spyOn: [(Delay forMilliseconds: 500) wait]) ] repeat] fork ]. (Delay forSeconds: 1) wait. processes do: [:each| each terminate]]
TestProfiler is a new subclass of Object without any variables or any other methods.
I'm not convinced this is a new bug with 3.10. It feels similar to something I've encountered earlier. It is happening frequently in 3.10 but not in 3.9.
Bryce