[pypy-dev] Problem with pypy-c and stacklesssocket.py

Andrew Francis andrewfr_ice at yahoo.com
Fri Oct 30 18:36:54 CET 2009


Hi Folks:

I was testing a simple echoserver with stackless python 2.5.2 and pypy-c. I am running Ubuntu 9.04 and I compiled pypy-c with --stackless and optimization level 1.

Under stackless python, the echoserver executes correctly. Under pypy-c, the server runs a while before I get:

_scheduler_switch(curr, task)
  File "/home/andrew/lab/pypy-dist/pypy/lib/stackless.py", line 156, in _scheduler_switch
    next.switch()
  File "/home/andrew/lab/pypy-dist/pypy/lib/stackless.py", line 452, in _func
    func(*argl, **argd)
  File "/home/andrew/lab/pypy-dist/lib-python/2.5.2/stacklesssocket.py", line 77, in ManageSockets
    asyncore.poll(0.05)
  File "/home/andrew/lab/pypy-dist/lib-python/2.5.2/asyncore.py", line 109, in poll
    is_r = obj.readable()
ReferenceError: weakly referenced object no longer exists

I am using the stacklesssocket.py from 

http://stacklessexamples.googlecode.com/svn/trunk/examples/networking/stacklesssocket.py

I have also enclosed the echoserver.py and a small test driver.py written with Twisted. I believe one can also use the drivers that come with the Beazley talk: http://www.dabeaz.com/coroutines/blaster.py

Meanwhile I am looking over stacklesssocket.py to understand the logic. That said, any suggestions would be appreciated.

Cheers,
Andrew


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: echoserver.py
Type: text/x-python
Size: 761 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091030/838d9408/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver.py
Type: text/x-python
Size: 1502 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091030/838d9408/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: problems
Type: application/octet-stream
Size: 3004 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20091030/838d9408/attachment.obj>


More information about the Pypy-dev mailing list