Bug 76174 - assertion from ImplDbgTestSolarMutex
Summary: assertion from ImplDbgTestSolarMutex
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.5.0 target:4.4.1
Keywords: haveBacktrace, notBibisectable
Depends on:
Blocks:
 
Reported: 2014-03-14 14:01 UTC by Terrence Enger
Modified: 2015-12-17 10:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace with symbols (19.83 KB, text/plain)
2014-03-14 14:18 UTC, Terrence Enger
Details
backtrace from master 2014-10-14 (18.40 KB, text/plain)
2014-10-20 13:22 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2014-03-14 14:01:09 UTC
STR:

(1) Download template 06_minutes.ott from
    https://bugs.freedesktop.org/attachment.cgi?id=59830 and open it
    in Writer.  Program displays dislog "LibreOfficeDev 4.3" with a
    section headed "Minutes Type".

(2) Drag that dialog box around.

(3) In the LibreOffice dialog, click the <OK> button.  Program issues
    the message

        soffice.bin: /home/terry/lo_hacking/git/libo4/vcl/source/app/dbggui.cxx:        1624: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->CheckYieldMutex()' failed.
        Application Error
        Fatal exception: Signal 6

    and exits.


My LibreOffice is master commit 806f4d8, fetched 2014-03-04,
configured:
    --enable-option-checking=fatal
    --enable-dbgutil
    --enable-crashdump
    --without-system-postgresql
    --without-myspell-dicts
    --with-extra-buildid
    --without-doxygen
    --with-external-tar=/home/terry/lo_hacking/git/src
built and running on debian-wheezy.


BTW, this started as I was looking at Thomas Hackert's message on the
qa list "Crash, when undoing numbering of headers in a Writer
template"
<http://nabble.documentfoundation.org/Libreoffice-qa-Crash-when-undoing-numbering-of-headers-in-a-Writer-template-tp4100662.html>
and the bug report arising, bug 75996 "Crash, when undoing steps in
attachment from bug #48582".
Comment 1 Terrence Enger 2014-03-14 14:18:07 UTC
Created attachment 95807 [details]
backtrace with symbols

Note frame 17:

#17 0x00007f77b9148cc3 in ImplDbgTestSolarMutex () at /home/terry/lo_hacking/git/libo4/vcl/source/app/dbggui.cxx:1624

The referenced function is:

1622: void ImplDbgTestSolarMutex()
1623: {
1624:     assert(ImplGetSVData()->mpDefInst->CheckYieldMutex());
1625: }
Comment 2 Terrence Enger 2014-03-14 14:32:21 UTC
I am leaving the bug status UNCONFIRMED because I suspect that the
problem may be not widespread.  Well, obviously it can happen only in
a debug build, but even less widespread than that.  OTOH, developers
may be interested just because solar mutex is involved.  Advice
welcome.
Comment 3 Alex Thurgood 2014-03-14 14:52:58 UTC
FWIW, I see something similar when testing Firebird in my debug build :

warn:legacy.osl:22546:1:connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1447: Not implemented yet!
warn:tools.debug:22546:1:tools/source/debug/debug.cxx:1121: no DbgTestSolarMutex function set
Comment 4 Stephan Bergmann 2014-03-14 15:31:59 UTC
(In reply to comment #3)
> FWIW, I see something similar when testing Firebird in my debug build :
> 
> warn:legacy.osl:22546:1:connectivity/source/drivers/firebird/
> DatabaseMetaData.cxx:1447: Not implemented yet!
> warn:tools.debug:22546:1:tools/source/debug/debug.cxx:1121: no
> DbgTestSolarMutex function set

That's unrelated to Terrence's issue.  Here, the warning is because (presumably in an additional process besides soffice.bin?) the functionality has not been set up to detect potential violations of SolarMutex locking.  If you have a recipe to reproduce it, I can have a look to eliminate the warning.
Comment 5 Alex Thurgood 2014-03-14 15:45:51 UTC
(In reply to comment #4)

Hi Stephan,

> 
> That's unrelated to Terrence's issue.  Here, the warning is because
> (presumably in an additional process besides soffice.bin?) the functionality
> has not been set up to detect potential violations of SolarMutex locking. 
> If you have a recipe to reproduce it, I can have a look to eliminate the
> warning.

OK, will open another bug report for that. Easy to reproduce on my system.
Create an empty Firebird embedded db.
Add a table and/or data, e.g. by dragging and dropping from a Calc sheet.
Save, and close the Firebird ODB file.
 But, like I said, I will open a separate issue for this.


Alex
Comment 6 Alex Thurgood 2014-10-20 07:52:43 UTC
@Terrence : I don't get a crash with my debug master 440 build on OSX, with the document you indicated. Do you still get this ?
Comment 7 Terrence Enger 2014-10-20 13:22:09 UTC
Created attachment 108117 [details]
backtrace from master 2014-10-14

Thank you, Alex, for the reminder.


The daily dbgutil bisect version 2014-10-20 and my dbgutil of master
commit 9d24f6b, fetched 2014-10-14, fail with a different assertion:

    soffice.bin: /home/terry/lo_hacking/git/libo4/vcl/source/app/dbggui.cxx:793: void ImplDbgTestSolarMutex(): Assertion `ImplGetSVData()->mpDefInst->CheckYieldMutex()' failed.

Attached backtrace is from my build.  I am *assuming* that this
information belongs here, but if it deserves a new bug report, I can
do that.

The daily dbgutil bisect version 2014-10-20 raises the same assertion.


I am setting bug status UNCONFIRMED.


My build is master commit 9d24f6b, fetched 2014-10-14 18:56 UTC,
configured:

    CXXFLAGS=-std=c++11 --enable-option-checking=fatal
    --enable-dbgutil --enable-crashdump --without-system-postgresql
    --without-myspell-dicts --with-extra-buildid --without-doxygen
    --with-external-tar=/home/terry/lo_hacking/git/src
    --disable-gstreamer --enable-gstreamer-0-10

built and running on debian-wheezy 64-bit.
Comment 8 Terrence Enger 2014-10-20 13:33:36 UTC
The assertion is already present in daily dbgutil bibisect version
oldest (of course: the bug report is older than the repository), and
other bibisect repositories have product builds.  Setting whiteboard
notBibisectable.
Comment 9 Matthew Francis 2014-10-28 09:58:10 UTC
Even though the backtrace has changed, this will only ever have happened on a dbgutil build so I think it's fine to go with the latest master backtrace. If it turns out there's another assert still hiding under the latest one, that can be dealt with later.

I can reproduce the latter backtrace with current master on both Linux and OSX, so setting -> NEW and Platform: All
Comment 10 Alex Thurgood 2015-01-03 17:41:31 UTC
Adding self to CC if not already on
Comment 11 Michael Stahl (allotropia) 2015-01-29 20:54:35 UTC
fixed on master
Comment 12 Michael Stahl (allotropia) 2015-01-29 21:30:00 UTC
the bots are lazy today, commit is a4faad707c7fb27884fff5f20e5797b160d4f320
Comment 13 Commit Notification 2015-01-30 11:36:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=22671c1545f8bfff660acdf981d6d36bf73ded63&h=libreoffice-4-4

tdf#76174: basic: lock SolarMutex in BasicScriptListener_Impl

It will be available in 4.4.1.

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 14 Terrence Enger 2015-02-01 15:29:07 UTC
The crash is gone with master commit dec9050d, fetched 2015-01-31
04:40 UTC.  I am setting bug status to VERIFIED FIXED.

Thank you, Michael.
Comment 15 Robinson Tryon (qubit) 2015-12-17 10:55:40 UTC Comment hidden (obsolete)