[Twisted-Python] UDP crashes python.exe when using IOCPReactor

Amaury Forgeot d'Arc amauryfa at gmail.com
Wed Dec 16 08:03:55 EST 2009


2009/12/16 Josh Albrecht <thejash at gmail.com>

> Thanks.  I changed the way I was installing the reactor, but it had no
> effect.
>
> I did not realize that Windows 7 was unsupported.  However, I've also
> reproduced this bug on windows XP, so I think it's a larger issue,
> unfortunately.
>

I also reproduce the problem consistently with a custom build of python2.5.1
with Visual Studio 8.
It never occurs in non-optimized build, but I was able to include debug info
and attach the debugger.

The errors are really strange: it seems that a register randomly changes its
value to 0x10

python25.dll!PyEval_CallObjectWithKeywords
        (_object * func=0x00fa3968, _object * arg=tuple(), _object *
kw=0x00000010)
python25.dll!PyInstance_New
        (_object * klass=0x00f516c0, _object * arg=tuple(), _object *
kw=0x00000010)
python25.dll!PyObject_Call
        (_object * func=0x00f516c0, _object * arg=tuple(), _object *
kw=0x00000000)
python25.dll!do_call
        (_object * func=0x00f516c0, _object * * * pp_stack=0x0021e6b0, int
na=2, int nk=0)

See how the "kw=0x0" becomes "kw=0x10" in inner frames.

I've also seen crashes in PyObject_GenericGetAttr, where the register which
holds the __mro__ contains 0x10, when the debugger still shows
((PyTupleObject*)(obj->ob_type->tp_mro))->ob_item == 5

Very very strange things are happening. Is it possible that some hardware
interruption does not restore the registers correctly?
I tried to modify the python intepreter, add printf statements... The crash
occurs at several places (sometimes it disappears completely), but all
crashes are similar: some register value becomes 0x10...
I can perform other tests if someone has an idea.

Note that in a non-optimized debug build, one of the Echoer stops working,
after exactly 1000 datagrams have been received (and no, it's not related to
sys.setrecursionlimit)

-- 
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20091216/39531f0b/attachment.htm 


More information about the Twisted-Python mailing list