Nikolaus Rath <nikol...@rath.org> added the comment:

In this simple example, FUSE does not fork and does not start any threads.

Note that PyGILState_Ensure() cannot do anything here. What happens is this:

 - call_hello.py calls FUSE in a new thread, releasing the GIL.
 - FUSE mounts the file system and waits for requests
 - Meanwhile, in the main thread, call_hello.py calls opendir(), but does not 
release the GIL
 - FUSE receives the opendir() system call and calls the appropriate callback 
function
 - If the callback function is implemented in C, everything works fine.
 - If the callback function is implemented in Python, the FUSE thread tries to 
acquire the GIL to call the (Python) opendir() handler. But it cannot do so, 
because the GIL is still held by the main thread (which is waiting for the 
opendir syscall to return) => deadlock.

----------

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

Reply via email to