[Stackless] Strange crashes after channel send/receive
Lloyd Weehuizen
lloyd at fusion.net.nz
Tue May 30 11:11:53 CEST 2006
Hi Chris
Christian Tismer wrote:
>
>> Python is embedded in my application and the main update loop calls
>
> Besides the fact that doing things this way guarantees worst
> possible performance :-) - (I assume that you are calling into
> uninitialized Stackless all the time, and the main tasklet
> gets re-created all the time?) -
> are you absolutely sure that you don't call into things
> in your C code that is non-reentrant? This is easy to do
> with Stackless.
Wow, ok, thanks for that tip, I was planning on moving the scheduling
completely into C++ to bypass the python update at a later time,
although I didn't realise it was creating a whole new main tasklet each
time currently no.
>> As far as I can tell it gets triggered after the C++ app sends a
>
> Please add checks about what your real main tasklet is.
> Maybe you are referring to a zombie?
The problem seems to have gone, I rolled back the code and placed a lot
more asserts throughout the python interface layers and did find a few
nasty issues to do with PyObjects, however I can't pin point exactly
which one was breaking things. As you say it was probably worsened by
reentrant code.
Its definitely not a stackless problem, just my lack of experience with
the Python API :)
>
>> Does anybody have any tips on the best way to start debugging a
>
> There is not too much. I recommend a debug build, of course.
> And you can register callbacks on schedule() calls and channel
> operations for debugging.
Thanks, will take a look at the schedule callbacks...
>
> If you don't mind, you also can send me the whole project
> and I can take a look.
Unfortunately I'm not able to send the code out at this time :(
> cheers - chris
Thanks,
Lloyd
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list