[Twisted-Python] deferToThread crashing on Windows, stable on Linux

Allen Bierbaum abierbaum at gmail.com
Thu Aug 30 13:10:23 EDT 2007

Ok.  I will start searching the code.

This may be more of a python question, but my crash ends up being:

Unhandled exception at 0x1e0ab834 in python.exe: 0xC0000005: Access
violation reading location 0x00005526.

I can go into visual studio and see the C/C++ call stack, but this
doesn't let me see the python callstack.  Is there a good way to get a
the python callstack (for multiple threads) when bug triggers on the
C/C++ side of the fence?


On 8/30/07, Chris Mellon <arkanes at gmail.com> wrote:
> On 8/30/07, Allen Bierbaum <abierbaum at gmail.com> wrote:
> > I have run into an interesting little bug and before I try to hunt it
> > down further I wanted to check and see if anyone else has seen
> > anything similar.
> >
> > I have a fairly complex twisted 2.5 application that uses
> > deferToThread to spawn off worker threads that need to call some
> > blocking non-twisted code (query webserver, query database, etc).  The
> > application uses these workers quite a bit but there are normally
> > never more then 2 or 3 outstanding requests running.
> >
> > The application runs rock-solid on Linux, but it crashes in less then
> > a minute on Windows.
> >
> > Has anyone else seen anything like this?  Are there any known issues
> > of deferToThread being less stable on Windows then Linux or are their
> > any differences between how twisted works on the platforms that I
> > should be looking into?
> >
> > -Allen
> I use deferToThread heavily for the same thing on Windows and haven't
> seen any crashes. I would double and triple check the threadsafety of
> the APIs you are calling.
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

More information about the Twisted-Python mailing list