Message218027
I'm a little closer to understanding the first (more common) traceback. I can repro it by running your demo program in a loop -- it may take a while but occasionally I do get the same InvalidStateError.
This appears to be an example of the problem speculated about in message #5 of https://code.google.com/p/tulip/issues/detail?id=58.
In order to find out which occurrence of call_later(future.set_result, None) is causing this, I replaced all of them (about half a dozen) with an equivalent lambda -- the lambda shows up in the traceback, unlike the location where call_soon() is called.
In this particular example, it is the last line of _SelectorSocketTransport.__init__() in selector_events.py (line 446).
I suspect there are other places where a similar problem can occur. I still have to think more about how to fix this (without changing set_result() to always ignore a cancelled Future -- such a change would mask certain errors that I find important to catch). |
|
Date |
User |
Action |
Args |
2014-05-06 22:13:27 | gvanrossum | set | recipients:
+ gvanrossum, pitrou, vstinner, giampaolo.rodola, python-dev, yselivanov, ryder.lewis |
2014-05-06 22:13:27 | gvanrossum | set | messageid: <1399414407.22.0.211747679168.issue21447@psf.upfronthosting.co.za> |
2014-05-06 22:13:27 | gvanrossum | link | issue21447 messages |
2014-05-06 22:13:26 | gvanrossum | create | |
|