Bug 92440 - Deadlock in callback to Python
Summary: Deadlock in callback to Python
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:5.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 02:12 UTC by Matthew Francis
Modified: 2016-10-25 19:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Reproducer script (8.61 KB, text/plain)
2015-06-30 02:18 UTC, Matthew Francis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Francis 2015-06-30 02:12:21 UTC
Callbacks from UNO to Python intermittently lead to a deadlock in
Implementation::inspect() in stoc/source/inspect/introspection.cxx

See also http://lists.freedesktop.org/archives/libreoffice/2015-June/068986.html
Comment 1 Matthew Francis 2015-06-30 02:18:22 UTC
Created attachment 116939 [details]
Reproducer script

Reproducer script attached - to run:

export PYTHONPATH=[some_directory]/core/instdir/program
export URE_BOOTSTRAP="vnd.sun.star.pathname:[some_directory]/core/instdir/program/fundamentalrc"

for i in `seq 1 100`; do ./test.py; done


At least for me it's rather prone to locking up the X session (with or without SAL_NO_MOUSEGRABS, etc.) so have a remote terminal handy before trying.

The payload is the last function in the script - the rest is just setup/support code.
Comment 2 Matthew Francis 2015-06-30 02:21:52 UTC
Adding Cc: to sbergman@redhat.com as requested - thanks
Comment 3 Commit Notification 2015-06-30 12:11:46 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a12db8e9e1960f3f209f1b95547041681566d636

tdf#92440: Reduce code areas covered by mutex

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.