STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Use a core dump: good idea!

haypo> Using my fuzzer (Fusil) on Python trunk, I got sometimes 
haypo> errors on multiprocessing.Pool():
haypo> 
haypo>    Fatal Python error: PyEval_AcquireThread: NULL new thread state

I read the source code of the thread module. This error means that 
PyThreadState_New() returns NULL which occurs if malloc() failed. I hit this 
error using my fuzzer because the fuzzer limits the total memory to something 
around 100 MB using setrlimit().

Said differently: in low memory condition, creating a new thread may exit the 
whole Python process if a memory allocation fail.

--

Sometimes, I get another error, similar to the "NULL new thread state" error:

   Fatal Python error: Couldn't create autoTLSkey mapping

I guess that the reason is the same: memory allocation failed. It should be 
the malloc() in find_key() (Python/thread.c).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7544>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to