Patch is quite simple and allow better error handling.Īuthor: Amaury Forgeot d'Arc (amaury.forgeotdarc) * Raise a MemoryError if the allocation fail, instead of raising a *fatal* Python error. Here I come with a patch! nirai idea was the good one: prealloc PyThreadState before creating the thread. Memory can be pre-allocated by thread_PyThread_start_new_thread() before No, I don't think that this issue is related, because it starts withĪnother message: "Invalid thread state for this thread". We just had this error on one of the buildbots:įatal Python error: Invalid thread state for this threadįatal Python error: PyEval_AcquireThread: non-NULL old thread state The malloc() in find_key() ( Python/thread.c). I guess that the reason is the same: memory allocation failed. Sometimes, I get another error, similar to the "NULL new thread state" error:įatal Python error: Couldn't create autoTLSkey mapping Whole Python process if a memory allocation fail. Said differently: in low memory condition, creating a new thread may exit the I hit thisĮrror using my fuzzer because the fuzzer limits the total memory to something PyThreadState_New() returns NULL which occurs if malloc() failed. I read the source code of the thread module. Haypo> Fatal Python error: PyEval_AcquireThread: NULL new thread state Haypo> Using my fuzzer (Fusil) on Python trunk, I got sometimes (as for how to reproduce the bug, it's your task to find it out :-)) Information, assuming it can reproduce the bug. You can also try a debug build of Python which may give you more Theįatal Python error will leave a core file so that you can find out the How can I get more information on the bug? How can I reproduce it?Įnable core dumps (`ulimit -c unlimited`) and re-run your tests. I have the error onĪn Intel Core2 Quad Core Q9300 (CPU able to run 4 processes/threads at Suppose that the error depends on the system load. I'm sorry but I don't have example script to reproduce the bug. Using my fuzzer (Fusil) on Python trunk, I got sometimes errors onįatal Python error: PyEval_AcquireThread: NULL new thread state Fatal error on thread creation in low memory conditionĪmaury.forgeotdarc, jnoller, nirai, pitrou, vstinnerĬreated on 12:49 by vstinner, last changed 14:56 by admin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |