Created attachment 70610 [details] patch to LibreOffice 3.5.7.2 which fixed the deadlock in PyUNO Problem description: Setting any writable attributes of a PyUNO component (in my case a custom PyUNO component implementing the service 'com.sun.star.sheet.Solver') results in a dead-lock on Linux when the built-in GUI tries to set any attribute on the implemented PyUNO component. A detailed Apache OpenOffice bug report which points to a working fix to the problem: https://issues.apache.org/ooo/show_bug.cgi?id=118798 Using the above, I have applied a patch on LibreOffice 3.5.7.2 and it has solved the problem. I believe this patch should be applied in all released versions of LibreOffice. Current behavior: LibreOffice hangs completely. Expected behavior: Writing Python attributes from other languages (like C++) should not freeze the whole office package and it ought to work. Operating System: Ubuntu
i take it the CPython GIL is not recursive? that code is obviously broken in that case. that patch you attached is identical to the ApacheOO SVN commit cited in the AOO bug. my understanding is that due to the messy licensing situation we can only apply that on master and the 4.0 branch, but not the 3.6 branch. thanks for pointing out this problem and its solution. http://cgit.freedesktop.org/libreoffice/core/commit/?id=374c9af20d93029d999ca21beb2b989e0a428b98 http://cgit.freedesktop.org/libreoffice/core/commit/?id=68086c59acd936d677dbc76473d34b484ec0b809
"i take it the CPython GIL is not recursive?" I suppose so... The patch has fixed my problem and it doesn't seem to cause problems. "my understanding is that due to the messy licensing situation we can only apply that on master and the 4.0 branch, but not the 3.6 branch" Well, given the very trivial nature of the fix (it's merely swapping code lines), I find this rather weird. Please try to doublecheck you cannot apply this fix on earlier versions indeed. Thanks for your consideration.