GNOME Bugzilla – Bug 629042
GObject Introspection bindings deadlock when used from threaded program
Last modified: 2010-11-03 15:03:13 UTC
Created attachment 169750 [details] [review] Release python interpreter lock when calling into C functions I have a threaded python app using PyGObject with some GObject Introspection bindings. One thread is feeding data to another thread via a queue. More often than not, it deadlock the whole process. When this occurs I see one thread trying to obtain the python interpreter lock, while another thread is sitting in one of my app's C functions. The second thread should have released the python interpreter lock before calling into my apps' C function, but it has not.
+ Trace 223592
Looking at the code, the problem appears to be that the _invoke_function() method in pygobject is missing calls to pyg_begin_allow_threads; pyg_end_allow_threads; My immediate problem is with the Fedora build version pygobject2-2.21.5-3.fc14 (cf https://bugzilla.redhat.com/show_bug.cgi?id=631730), but latest GIT appears to still be missing these thread calls too, hence this BZ.
Can you provide a simple test that deadlocks?