[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

Antoine Pitrou report at bugs.python.org
Wed Jan 20 12:11:42 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Releasing the GIL when calling C library functions (e.g. opendir()) is not a requirement, it's just an optimization for slightly better multi-threading. Also, as shown in the backtrace, PyGILState_Ensure() is called which should only try to acquire the GIL if it isn't already held by the current thread; that is, it is designed to avoid the deadlock you are witnessing.

So, I would suggest the problem lies somewhere else. Does FUSE implicitly do a fork() of the current process? It's not obvious how the example shown here works.

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7736>
_______________________________________


More information about the Python-bugs-list mailing list