[mod_python] PyThreadState_Delete: tstate is still current

Jim Gallacher jg.lists at sympatico.ca
Tue Oct 11 14:40:17 EDT 2005


Peter Sanchez wrote:
> OK, I tried 3.2.2b from source. Now, when I start apache, the logs just 
> go into a loop with the same errors as before :)
> 
> [Tue Oct 11 10:26:14 2005] [notice] Apache/2.0.54 (FreeBSD) PHP/4.4.0 
> mod_python/3.2.0b Python/2.4.1 configured -- resuming normal operations
> [Tue Oct 11 10:26:14 2005] [notice] child pid 26791 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 26318 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 26317 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24178 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24162 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24148 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24133 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24122 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24050 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 24033 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 23318 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 23285 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 23266 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [notice] child pid 23195 exit signal Abort 
> trap (6)
> [Tue Oct 11 10:26:14 2005] [error] make_obcallback: could not call init.\n
> TypeError: init() takes exactly 2 arguments (0 given)
> Fatal Python error: PyThreadState_Delete: tstate is still current
> [Tue Oct 11 10:26:14 2005] [error] make_obcallback: could not call init.\n
> TypeError: init() takes exactly 2 arguments (0 given)
> Fatal Python error: PyThreadState_Delete: tstate is still current
> 
> Note, these were being given while NOT loading my mod_python code, I 
> think it was doing this for every 'normal' apache instance. I quickly 
> reverted back to the last setup (mod_pyton/3.1.4)
> 
> Any other ideas guys?
> 
> Thanks,
> 
> Peter
> 

This sounds like the problem I was having trying to get the 3.2.2b unit 
tests to pass on FreeBSD. This was discussed on the python-dev list 
around Sept 10.

You can read the archive on gmane at 
http://comments.gmane.org/gmane.comp.apache.mod-python.devel/1465

Grisha suggested you can see this sort of problem on FreeBSD where 
Python is threaded and Apache is not and offered the following:

   If you built apache without thread support, you may need to add the 
  following lines to $PREFIX/sbin/envvars:

  LD_PRELOAD=/usr/lib/libc_r.so
  export LD_PRELOAD

Regards,
Jim


More information about the Mod_python mailing list