Hi Kristjan: Thanks for the explanation and the effort. Tomorrow, I'll hunt down a few things on my end. If you find ToyProcessor5 too convoluted, I'll post the code for another prototype that should be easier to follow.
Cheers, Andrew --- On Tue, 2/3/09, Kristján Valur Jónsson <krist...@ccpgames.com> wrote: > From: Kristján Valur Jónsson <krist...@ccpgames.com> > Subject: RE: [Stackless] Maximum Recursion Depth Error with Twisted > 8.2/Stackless 2.6.1 > To: "Andrew Francis" <andrewfr_...@yahoo.com>, > "twisted-python@twistedmatrix.com" <twisted-python@twistedmatrix.com> > Cc: "stackl...@stackless.com" <stackl...@stackless.com> > Date: Tuesday, February 3, 2009, 1:49 AM > Stackless does stack copying if it senses that the C stack > has grown to deep. But it still tries to maintain the > recursion depth limit set in "sys". There is > probably a bug somewhere in the bookkeeping of this. > I'll try trawling through the code for the > corresponding stuff If I find the time today. > K > > -----Original Message----- > From: stackless-boun...@stackless.com > [mailto:stackless-boun...@stackless.com] On Behalf Of Andrew > Francis > Sent: 2. febrúar 2009 22:48 > To: twisted-python@twistedmatrix.com > Cc: stackl...@stackless.com > Subject: [Stackless] Maximum Recursion Depth Error with > Twisted 8.2/Stackless 2.6.1 > > Hi Colleagues: > > I recently updated to Stackless 2.6.1 and Twisted 8.2. I > executed the following programme that works fine under > Stackless 2.5.2 and Twisted (including 8.2) and I received > the following error: > > traceback (most recent call last): > File "ToyProcessor5.py", line 60, in > twistedReactor > reactor.run() > File > "/usr/local/lib/python2.6/site-packages/twisted/internet/base.py" > , line 1048, in run > self.mainLoop() > --- <exception caught here> --- > File > "/usr/local/lib/python2.6/site-packages/twisted/internet/base.py" > , line 1057, in mainLoop > self.runUntilCurrent() > File > "/usr/local/lib/python2.6/site-packages/twisted/internet/base.py" > , line 707, in runUntilCurrent > log.deferr() > File > "/usr/local/lib/python2.6/site-packages/twisted/python/log.py", > l ine 153, in err > _stuff = failure.Failure() > File > "/usr/local/lib/python2.6/site-packages/twisted/python/failure.py > ", line 265, in __init__ > parentCs = reflect.allYourBase(self.type) > ", line 542, in allYourBase > accumulateBases(classObj, l, baseClass) > File > "/usr/local/lib/python2.6/site-packages/twisted/python/reflect.py", > line 550, in accumulateBases > accumulateBases(base, l, baseClass) > File > "/usr/local/lib/python2.6/site-packages/twisted/python/reflect.py", > line 550, in accumulateBases > accumulateBases(base, l, baseClass) > File > "/usr/local/lib/python2.6/site-packages/twisted/python/reflect.py", > line 550, in accumulateBases > accumulateBases(base, l, baseClass) > File > "/usr/local/lib/python2.6/site-packages/twisted/python/reflect.py", > line 550, in accumulateBases > accumulateBases(base, l, baseClass) > exceptions.RuntimeError: maximum recursion depth > exceeded > > Similarily written programmes fail in the same fashion. > What is suspicious is that there is no recursion in the > offending section. Even if I create one worker tasklet, I > get the same error. > > def twistedReactor(): > l = task.LoopingCall(stackless.schedule) > l.start(.01) > reactor.run() > > however, if I change > > l = task.LoopingCall(stackless.schedule) > > to > > l = task.LoopingCall(tick) > > and tick is > > def tick(): > stackless.schedule() > > the programme works. Although a work around, I would like > to find the real problem. > > What particular worries me is when I created small test > examples, I was not able to recreate the problem. Something > else is going on.... > > What I would appreciate is some hints as to what may be > happening. > > - I normally don't expect "Maximum Recursion > Depth" errors in Stackless. > - What is the reflect.allYourBases stuff? > - What is log.deferr? (I don't recall seeing that > method). > > If I get few clues, it would make it easier for me to write > new tests and zero in on the problem. Hopefully the problem > is with my code rather than Stackless 2.6.1 and/or Twisted > 8.2 > > I have included some sample code. Unfortunately > ToyProcessor5.py is a bit large (I have newer code that is > smaller but requires more files) > > Cheers, > Andrew _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python