Bug 101136 - ODatabaseDocument deadlocks
Summary: ODatabaseDocument deadlocks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-26 16:38 UTC by Michael Stahl (allotropia)
Modified: 2017-12-06 08:51 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
deadlocked stacks (13.45 KB, text/plain)
2016-07-26 16:38 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2016-07-26 16:38:27 UTC
Created attachment 126417 [details]
deadlocked stacks

if i run the crash-testing test-bugzilla-files.py with LO 5.1.4.2,
about 10% of the documents that are "exported" are actually
copies of the source document.

this is because during the export Base deadlocks and the python
script kills it after 180 seconds.  these timeout-kills are not
reported in the "crashlog" that is generated.

apparently calling ODatabaseDocument members on a non-main thread
doesn't work well because the main thread may be dispatching
some Idle or Timer at the same time that calls into Base UI,
which then may call ODatabaseDocument members.

that deadlocks because ODatabaseDocument has its own mutex.

i wonder if that can be fixed by replacing ODatabaseDocument's
own mutex with SolarMutex.
Comment 1 Julien Nabet 2016-07-26 16:51:08 UTC
Michael: could it be related to the fact that initialization process, when opening odb files, seems not ok? (see tdf#96703 put in see also)
Comment 2 Alex Thurgood 2016-07-27 13:13:40 UTC
Hi Michael,

Is this not just another occurrence of the behaviour in bug 96837 ?
Comment 3 Alex Thurgood 2016-07-27 16:18:19 UTC
Sorry, I meant bug 96387
Comment 4 Commit Notification 2016-08-03 11:29:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#101136 dbaccess: use SolarMutex in ModelMethodGuard

It will be available in 5.3.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.
Comment 5 Xisco Faulí 2016-09-26 10:25:49 UTC
Hello Michael,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Changing status to NEW.
Comment 6 Michael Stahl (allotropia) 2016-09-26 10:27:48 UTC
fixed on master, won't be backported