[Twisted-Python] Twisted Names - strange RuntimeError
Angelo Dell'Aera
angelo.dellaera at gmail.com
Sun Jan 9 06:10:11 EST 2011
Hi,
while developing a code based on Twisted Names I'm finding myself catching
RuntimeErrors like the one reported below.
2011-01-09 10:32:13+0100 [twisted.names.dns.DNSDatagramProtocol (UDP)]
Unhandled Error Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib64/python2.6/site-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, *args,**kw)
File "/usr/lib64/python2.6/site-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib64/python2.6/site-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib64/python2.6/site-packages/twisted/internet/epollreactor.py", line 220, in _doReadOrWrite
why = selectable.doWrite()
File "/usr/lib64/python2.6/site-packages/twisted/internet/base.py", line 1083, in doWrite
raise RuntimeError, "doWrite called on a %s" % reflect.qual(self.__class__)
exceptions.RuntimeError: doWrite called on a twisted.internet.udp.Port
The code which produces this error is really complex and is part of an
intelligence data gathering framework I'm developing for the Honeynet
Project (for those interested in details please take a look at my technical
blog http://buffer.antifork.org/blog/category/tip/ ).
I realized that
. the RuntimeError is raised really rarely (I see one of such errors
every 2-3 days and during this time frame millions of DNS requests
and replies are handled)
. using different Twisted versions doesn't make the problem disappear
(the attached traceback refers to version 10.2.0)
. selecting a different reactor doesn't make the problem disappear
Unfortunately I have not a test code for reproducing the issue and sincerely
speaking I really don't know how to write it because this condition is so rarely
met that I'm not able to understand what leads to it.
I could be wrong but taking a look at twisted.internet.udp.Port I see it defines a
write method so I really do not understand the reason why the BasePort doWrite
method raises such error.
Thanks for your attention and cheers,
--
Angelo Dell'Aera 'buffer'
Antifork Research, Inc. http://buffer.antifork.org
Metro Olografix
More information about the Twisted-Python
mailing list