Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Julien,

On Sun, 2012-03-04 at 12:02 -0800, julien2412 wrote:
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.

        Riight ... so this is down to the solar mutex being held in two threads
by the database code :-)

I attached the result of "thread apply all bt" made after Ctrl-C during the
hang.
http://nabble.documentfoundation.org/file/n3798832/bt.txt bt.txt 

        Threads 1 and 2 are deadlocking over this during the join. The question
is - why does thread 1 still hold the solar mutex: prolly just because
it's an occupational hazard :-)

        The question is (given the fragile pile of poorly done threading code),
combined with the amazing bus-load of superstitious mutexes all around
the place, how best to fix it.

        I would say that the framework / UNO code -should- have no need of
holding the solar mutex, so ... I would be -tempted- to poke at:

        framework/source/dispatch/closedispatcher.cxx

        and split out the impl_asyncCallback thing into two pieces, one of
which is the LINK that we Post (and get called back into) from VCL. As
VCL calls us the solar mutex is locked, so we need in that version to
have a (brave):

        SolarMutexReleaser aReleaser;

        or somesuch around the call to what was the impl_asyncCallback.

        Hopefully, that will drop the (probably) un-necessary, and un-expected
solar mutex there, and - with luck, won't reveal yet more hidden nasties
inside the framework / dbaccess code.

        Any chance you could try that out ?

        Many thanks,

                Michael.


-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.