[Twisted-Python] mystery exception

Vadim Zaliva krokodil at gmail.com
Tue Oct 14 21:14:47 EDT 2008

I am writing network proxy, based on proxy.py code. I am also using
getPage() and deffered. From time to time I am getting this mystery
exception, the source of which I could not track. Does anybody knows
what could be causing it? I am pretty sure I am not closing any sokets
twice in my code. The code writing 'x' seems weird to me.

      Traceback (most recent call last):
         File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
         File "/usr/lib64/python2.5/threading.py", line 440, in run
           self.__target(*self.__args, **self.__kwargs)
       --- <exception caught here> ---
         File "/usr/lib/python2.5/site-packages/twisted/python/threadpool.py",
 line 161, in _worker
           context.call(ctx, function, *args, **kwargs)
         File "/usr/lib/python2.5/site-packages/twisted/python/context.py", li
ne 59, in callWithContext
           return self.currentContext().callWithContext(ctx, func, *args, **kw
         File "/usr/lib/python2.5/site-packages/twisted/python/context.py", li
ne 37, in callWithContext
           return func(*args,**kw)
         File "/usr/lib/python2.5/site-packages/twisted/internet/threads.py",
line 29, in _putResultInDeferred
           reactor.callFromThread(deferred.callback, result)
         File "/usr/lib/python2.5/site-packages/twisted/internet/base.py",
line 824, in callFromThread
         File "/usr/lib/python2.5/site-packages/twisted/internet/base.py",
line 443, in wakeUp
         File "/usr/lib/python2.5/site-packages/twisted/internet/posixbase.py",
line 138, in wakeUp
           util.untilConcludes(os.write, self.o, 'x')
         File "/usr/lib/python2.5/site-packages/twisted/python/util.py",
line 757, in untilConcludes
           return f(*a, **kw)
       exceptions.OSError: [Errno 32] Broken pipe

My OS is:

Linux xxxx #1 SMP Tue Oct 30 13:18:33 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux

and I am using latest version of Twisted.


More information about the Twisted-Python mailing list