Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-30 Thread Tim Lesher
On Thu, Mar 29, 2012 at 17:26, Victor Stinner wrote: > The problem is not the frame, but the Python thread state referenced by the > frame. It's a private attribute. My patch just updates this reference before > running the generator (and it clears the reference when the generator > excution is st

Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-29 Thread Victor Stinner
On 29/03/2012 21:35, Tim Lesher wrote: From a theoretical standpoint, I can't quite decide what the real error is: 1) the fact that PyGILState_Release() destroys a temporary thread state that may still be referenced by some objects, or 2) the fact that some code is trying to keep frame objects

Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-29 Thread Tim Lesher
On Wed, Mar 28, 2012 at 06:45, Victor Stinner wrote: > We have a crash in our product when tracing is enabled by > sys.settrace() and threading.settrace(). If a Python generator is > created in a C thread, calling the generator later in another thread > may crash if Python tracing is enabled. > >

Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Victor Stinner
2012/3/28 Guido van Rossum : > Interesting bug. :-( > > It seems bugs.python.org is back up, so can you file it there too? It took us weeks to track the bug. Here is the issue: http://bugs.python.org/issue14432 Victor ___ Python-Dev mailing list Python-

Re: [Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Guido van Rossum
Interesting bug. :-( It seems bugs.python.org is back up, so can you file it there too? On Wed, Mar 28, 2012 at 3:45 AM, Victor Stinner wrote: > Hi, > > bugs.python.org is down so I'm reporting the bug here :-) > > We have a crash in our product when tracing is enabled by > sys.settrace() and th

[Python-Dev] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Victor Stinner
Hi, bugs.python.org is down so I'm reporting the bug here :-) We have a crash in our product when tracing is enabled by sys.settrace() and threading.settrace(). If a Python generator is created in a C thread, calling the generator later in another thread may crash if Python tracing is enabled.