Download it now!
Bug 47021 - [dbaccess] deadlock on closing base window
Summary: [dbaccess] deadlock on closing base window
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
Master old -3.6
Hardware: Other Linux (All)
: medium normal
Assignee: Stephan Bergmann
Whiteboard: target:3.6.0
Keywords: regression
Depends on:
Reported: 2012-03-06 14:23 UTC by Michael Stahl (CIB)
Modified: 2013-05-13 17:01 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:

patch (1.95 KB, patch)
2012-03-08 03:45 UTC, Michael Meeks

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (CIB) 2012-03-06 14:23:08 UTC
Julien found this deadlock:

> On master only (I don't have the problem on 3.5 branch), Base hangs when I
> try to close it. I must select "Tables"/"Queries" or others to have the
> problem. If I just open a file and close, i don't have this problem.

i can reproduce this on current master from yesterday,
master 8829b7c9, master 46506f82, but not master 904d59fa or libreoffice-3-5.
so it looks like a recent regression.

the proposed patch by mmeeks probably does not fix the problem,
because the SolarMutex is locked some more up the stack of the main thread:

> void SAL_CALL OGenericUnoController::dispose() throw(::com::sun::star::uno::RuntimeException)
> {
>     SolarMutexGuard aSolarGuard;
>     OGenericUnoController_Base::dispose();
> }

i'd guess the deadlock was caused by this commit, which introduced the
+            m_pEventBroadcaster->join();

Comment 1 Michael Meeks 2012-03-08 03:45:58 UTC
Created attachment 58176 [details]

Nice hunting Michael - what did you think of my patch ? :-) [ which I re-attach ]
Comment 2 Michael Stahl (CIB) 2012-03-08 03:57:15 UTC
@mmeeks: if you had actually read the description you would have
noticed that i don't think the patch will work :)
Comment 3 Not Assigned 2012-03-09 00:19:01 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

fdo#47021: the naive join attempt leads to deadlock
Comment 4 Stephan Bergmann 2012-03-09 00:33:10 UTC
...turns out the attempt of <> "Make sure spawned thread is joined again" was too naive.  So better avoid the deadlock and instead live with the occasional test failure for now (the problem leading to the naive join attempt had been some test failing during shutdown).
Comment 5 Rainer Bielefeld Retired 2012-04-05 08:12:09 UTC
I added Fix submitter as assignee because this will ease queries and bug tracking.