[sldev] help with beta-1

Donovan Preston donovan at lindenlab.com
Fri Dec 14 10:56:18 PST 2007


After some investigation, I discovered that this was a real bug. We  
never noticed before because every greenlet we started also had a  
timer started in it, because that's how eventlet.httpd works.

The fix:

http://svn.secondlife.com/trac/eventlet/changeset/71

Attached is a test file which will exhibit the bug in a revision  
before 71 but not exhibit bad behavior at revision 71.

Donovan

On Dec 11, 2007, at 10:08 PM, mark wrote:

> On Dec 11, 2007 3:46 PM, Donovan Preston <donovan at lindenlab.com>  
> wrote:
> It does look like a genuine bug. Replace the line:
> On Dec 11, 2007, at 2:43 PM, mark wrote:
>
> > i checked out beta-1 version, and I installed greenlet version 0.1
> > from easy_install,
> > and i get this error, it freezes..
> > how to fix this?
>
> >   File "/home/mark/work/main/animmes/eventlet/runloop.py", line 218,
> > in cancel_timers
> >     for timer in self.timers_by_greenlet[greenlet]:
>
> With this:
>
>        for timer in self.timers_by_greenlet.get(greenlet, ()):
>
> If this turns out to fix it, please open a JIRA issue and submit a
> I get this error now:
>
> Traceback (most recent call last):
>   File "/home/mark/work/main/animmes/eventlet/pollhub.py", line 170,  
> in wait
>     read(fileno)
>   File "/home/mark/work/main/animmes/eventlet/api.py", line 146, in cb
>     greenlib.switch(self, fd)
>   File "/home/mark/work/main/animmes/eventlet/greenlib.py", line  
> 310, in switch
>     rval = other.switch(value, exc)
>   File "/home/mark/work/main/animmes/eventlet/greenlib.py", line  
> 287, in greenlet_body
>     return cb(*args)
>   File "/home/mark/work/main/animmes/eventlet/api.py", line 159, in  
> _spawn_startup
>     return cb(*args, **kw)
>   File "/home/mark/work/main/animmes/eventlet/coros.py", line 113,  
> in _main_loop
>     api.get_hub().runloop.cancel_timers(api.getcurrent())
>   File "/home/mark/work/main/animmes/eventlet/runloop.py", line 224,  
> in cancel_timers
>     del self.timers_by_greenlet[greenlet]
> KeyError: < greenlet.greenlet object at 0xb6dbad0>
> Removing descriptor: 13
>
>
> I tried to change this again like the fix you gave, but that gave  
> another error, so that is not the right thing to do..
> how to fix this?

-------------- next part --------------
Skipped content of type multipart/mixed


More information about the SLDev mailing list