threading issue on Solaris SMP

Aahz aahz at pythoncraft.com
Tue Oct 15 13:28:47 EDT 2002


In article <15dadc2b.0210150846.4db8c5cc at posting.google.com>,
Andy <awalshe at iel.ie> wrote:
>
>When testing i send in multiple simultaneous requests which spawn a
>new thread. Each new thread then grabs a sub-interpreter from a pool,
>loads the relevant script and runs it.
>
>On a 4 processor system after a number of requests are handled i get
>the error "Fatal Python error: ceval: orphan tstate" and a core dump
>occurs. I've ran the same tests on a single processor system and no
>problem occurs.

Tim Peters may have more to say, but I'd bet you're not properly handling
Python's thread state, and it's a race condition that only happens when
multiple threads are truly running simultaneously (actually, my
experience is that such race conditions *can* occur on single-CPU
systems, but the chance goes up exponentially with the number of CPUs).
I believe there are no currently open bugs regarding Python's internal
mechanisms for handling threads, but you might want to check SourceForge.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list