This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author timbishop
Recipients
Date 2007-07-23.13:09:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Further info about what's causing the "Invalid thread state for this thread".

#0  0xfefa0218 in _lwp_kill () from /usr/lib/libc.so.1
(gdb) f 4
#4  0xfe2a8990 in PyThreadState_Swap (newts=0x296c58) at Python/pystate.c:320
320                             Py_FatalError("Invalid thread state for this thread");
(gdb) l
315                        to it, we need to ensure errno doesn't change.
316                     */
317                     int err = errno;
318                     PyThreadState *check = PyGILState_GetThisThreadState();
319                     if (check && check->interp == newts->interp && check != newts)
320                             Py_FatalError("Invalid thread state for this thread");
321                     errno = err;
322             }
323     #endif
324             return oldts;
(gdb) p check
$1 = (PyThreadState *) 0x19c880
(gdb) p *check
$2 = {next = 0x0, interp = 0x199f90, frame = 0x0, recursion_depth = 0, tracing = 0, use_tracing = 0, c_profilefunc = 0, c_tracefunc = 0, 
  c_profileobj = 0x0, c_traceobj = 0x0, curexc_type = 0x0, curexc_value = 0x0, curexc_traceback = 0x0, exc_type = 0xfe3457c4, 
  exc_value = 0x0, exc_traceback = 0x0, dict = 0x0, tick_counter = 40, gilstate_counter = 1, async_exc = 0x0, thread_id = 1}
(gdb) p newts
$3 = (PyThreadState *) 0x296c58
(gdb) p *newts
$4 = {next = 0x19c880, interp = 0x199f90, frame = 0x0, recursion_depth = 0, tracing = 0, use_tracing = 0, c_profilefunc = 0, 
  c_tracefunc = 0, c_profileobj = 0x0, c_traceobj = 0x0, curexc_type = 0x0, curexc_value = 0x0, curexc_traceback = 0x0, exc_type = 0x0, 
  exc_value = 0x0, exc_traceback = 0x0, dict = 0x0, tick_counter = 0, gilstate_counter = 1, async_exc = 0x0, thread_id = 1}
(gdb) p oldts
$5 = (PyThreadState *) 0x0
(gdb) 
History
Date User Action Args
2007-08-23 14:58:48adminlinkissue1758146 messages
2007-08-23 14:58:48admincreate