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 vstinner
Recipients koobs, lukasz.langa, pablogsal, pitrou, vstinner
Date 2019-06-04.01:01:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> commit 396e0a8d9dc65453cb9d53500d0a620602656cfe (refs/bisect/bad)

Extract of this change:
 
 static inline void
-exit_thread_if_finalizing(_PyRuntimeState *runtime, PyThreadState *tstate)
+exit_thread_if_finalizing(PyThreadState *tstate)
 {
+    _PyRuntimeState *runtime = tstate->interp->runtime;
     /* _Py_Finalizing is protected by the GIL */
     if (runtime->finalizing != NULL && !_Py_CURRENTLY_FINALIZING(runtime, tstate)) {
         drop_gil(&runtime->ceval, tstate);
@@ -236,7 +237,7 @@ PyEval_AcquireLock(void)
         Py_FatalError("PyEval_AcquireLock: current thread state is NULL");
     }
     take_gil(ceval, tstate);
-    exit_thread_if_finalizing(runtime, tstate);
+    exit_thread_if_finalizing(tstate);
 }
 

This change is fine for regular Python threads. But for daemon threads, tstate is likely already corrupted, so it's no longer possible to get interp from interp, and so also not possible to get 'runtime'.
History
Date User Action Args
2019-06-04 01:01:52vstinnersetrecipients: + vstinner, pitrou, lukasz.langa, koobs, pablogsal
2019-06-04 01:01:52vstinnersetmessageid: <[email protected]>
2019-06-04 01:01:52vstinnerlinkissue37135 messages
2019-06-04 01:01:52vstinnercreate