Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_thread.start_new_thread() no longer calls PyThread_exit_thread() explicitly
at the thread exit, the call was redundant. On Linux with the glibc,
pthread_exit() aborts the whole process if dlopen() fails to open
libgcc_s.so file (ex: EMFILE error). Patch by Victor Stinner.
4 changes: 3 additions & 1 deletion Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,9 @@ thread_run(void *boot_raw)
PyThreadState_Clear(tstate);
_PyThreadState_DeleteCurrent(tstate);

PyThread_exit_thread();
// bpo-44434: Don't call explicitly PyThread_exit_thread(). On Linux with
// the glibc, pthread_exit() can abort the whole process if dlopen() fails
// to open the libgcc_s.so library (ex: EMFILE error).
}

static PyObject *
Expand Down