Callback deadlock

Stephan Bergmann sbergman at redhat.com
Mon Jun 29 00:25:14 PDT 2015


On 06/29/2015 07:58 AM, Matthew J. Francis wrote:
> I'm intermittently experiencing the attached deadlock in some Python code.
>
> As far as I can tell, the deadlock appears to be between a call to an
> XTopWindowListener in thread 1 (the listener, also in Python code,
> doesn't yet do anything more than print "I am here" on a callback) and
> the main thread which is attempting to enumerate the paragraphs of a
> text document in thread 2.
>
> Could anyone with more experience in UNO and locking matters help me to
> understand what's going on here? If what I'm trying to do is essentially
> not going to work, there is the alternative of busy-waiting for windows
> to appear, but I'd like to avoid that if possible.

In <http://pastebin.com/52FkaF2w>, the main thread 1 issued an URP 
request of css.awt.XTopWindowListener.windowActivated (and blocks 
waiting on the reply), while thread 2 serves an incoming URP request on 
SwXText::getPropertySetInfo (which happens to block waiting on the 
SolarMutex).

No other thread 3--9 looks like it has the SolarMutex locked, so it must 
be thread 1 that has it locked while making the windowActivated call, 
which would be a programming error somewhere in the call chain leading 
up to there.


More information about the LibreOffice mailing list