Bug Hunting Session
Bug 112288 - FILESAVE: LibreOffice is stuck while saving (MACOS)
Summary: FILESAVE: LibreOffice is stuck while saving (MACOS)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All Mac OS X (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords: regression
: 112289 (view as bug list)
Depends on:
Blocks: Save
  Show dependency treegraph
 
Reported: 2017-09-08 10:21 UTC by Telesto
Modified: 2017-10-23 08:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bt at random (5.36 KB, text/rtf)
2017-09-22 05:58 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-09-08 10:21:11 UTC
Description:
LibreOffice is stuck while saving. It looks like a scheduler issue to me

Steps to Reproduce:
1. Open attachment 133999 [details]
2. Save it (CMD+S)

Actual Results:  
Saving seems to be stuck 

Expected Results:
Saving should work normally


Reproducible: Always

User Profile Reset: No

Additional Info:
Build ID: 84e1f8567fa0a2b83323d8944307d1db7a5b45f5
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-09-06_10:01:15
Locale: nl-NL (nl_NL.UTF-8); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Alex Thurgood 2017-09-08 15:32:23 UTC
Confirming with 

Version: 6.0.0.0.alpha0+
Build ID: a27eb931c22313d4dd5c73b35358c0532d20b79e
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 2 Alex Thurgood 2017-09-08 15:42:49 UTC
Possibly, in this block of svapp.cxx lines 454-474 :

inline bool ImplYield(bool i_bWait, bool i_bAllEvents, sal_uLong const nReleased)
{
    ImplSVData* pSVData = ImplGetSVData();

    SAL_INFO("vcl.schedule", "Enter ImplYield: " << (i_bWait ? "wait" : "no wait") <<
             ": " << (i_bAllEvents ? "all events" : "one event") << ": " << nReleased);

    // TODO: there's a data race here on WNT only because ImplYield may be
    // called without SolarMutex; if we can get rid of LazyDelete (with VclPtr)
    // then the only remaining use of mnDispatchLevel is in OSX specific code
    // so that would effectively eliminate the race on WNT
    pSVData->maAppData.mnDispatchLevel++;

    // do not wait for events if application was already quit; in that
    // case only dispatch events already available
    bool bProcessedEvent =
        pSVData->mpDefInst->DoYield(
            i_bWait && !pSVData->maAppData.mbAppQuit,
            i_bAllEvents, nReleased);
Comment 3 Alex Thurgood 2017-09-08 15:45:12 UTC
Jan-Marek : any chance this is related to your recent changes ?
Comment 4 Alex Thurgood 2017-09-08 15:47:14 UTC
*** Bug 112289 has been marked as a duplicate of this bug. ***
Comment 5 Julien Nabet 2017-09-09 12:41:27 UTC
On Macos 10.12, with master sources updated 2 days ago, i could reproduce this.
Comment 6 Jan-Marek Glogowski 2017-09-21 07:47:23 UTC
Just FYI: I fixed 112289, which might be related or not. It probably is a duplicate, but I just verified and fixed bug 112289, as I couldn't verify the other problem.

I'm slowly merging all my scheduler fixes, which include larger changes for the macOS backend.
Comment 7 Julien Nabet 2017-09-21 17:06:51 UTC
with master sources updated today (4067487eb304c6686a22319c51790e41e311de08), I still reproduce this.
Comment 8 Julien Nabet 2017-09-22 05:58:01 UTC
Created attachment 136447 [details]
bt at random
Comment 9 Commit Notification 2017-09-26 11:54:04 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112288 Clarify Reschedule implementations

It will be available in 6.0.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 10 Jan-Marek Glogowski 2017-09-26 12:00:00 UTC
BTW: the attachment 133999 [details] is a great interactivity test document. LO on Mac becomes really sluggish when opening. My LO 5.[34] has problems to update the blinking cursor because of the background spell-checking of all the nonsense debug info. Should also be improved with this patch.
Comment 11 Alex Thurgood 2017-09-26 16:12:52 UTC
Hmm, still hanging for me with :

Version: 6.0.0.0.alpha0+
Build ID: 80d135922d5a5d0fd0d7178935653870cecf58ea
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 12 Alex Thurgood 2017-09-26 16:14:03 UTC
(In reply to Alex Thurgood from comment #11)



Ah, your commit was pushed after my build this morning, so will need to retry again with newer build.
Comment 13 Commit Notification 2017-09-27 12:55:52 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112288 compare event timestamp with sys uptime

It will be available in 6.0.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 14 Commit Notification 2017-09-28 13:35:41 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112288 set timestamp for otherEventWithType

It will be available in 6.0.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.