Bug 107761 - WindowsServer memory increase when using Calc
Summary: WindowsServer memory increase when using Calc
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.5.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2017-05-10 20:10 UTC by dev
Modified: 2018-05-16 18:35 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dev 2017-05-10 20:10:23 UTC
After opening LibreOffice, the WindowServer process memory usage is typically around 400-500 MB. After 1-3 days using Calc, the memory will slowly rise to beyond 10GB thereby slowing down much of the graphics response, desktop changes, etc.  Application response time is also affected presumably due to the graphics engine being tied up managing the WindowServer.

No crash or error messages are observed.  However, there is one log message that persists:

▼▼▼ LOG MESSAGE ▼▼▼

5/9/17 10:25:14.354 PM WindowServer[145]: [cps/setfront] Failed setting the front application to LibreOffice, psn 0x0-0x39a69a3, securitySessionID=0x186a4, err=-13066

▲▲▲ LOG MESSAGE ▲▲▲

Also, I know there is another WindowServer memory leak defect (107021) however that involves the Writer component performing a mail merge while my defect involves Calc and performing nothing terribly spectactular - just working with relatively small spreadsheets (2-3 open concurrently) with no more than 6 sheets per spreadsheet.

While the earliest version observed to 5.0.0.2, I also tested this in 5.2.7.2 and the issue persists.
Comment 1 Alex Thurgood 2017-05-11 06:52:06 UTC
Unfortunately, LO leaks memory on macOS, even at startup, see for example bug 99929, and also the other bug you already found for Writer.

You mention "after 1-3 days using Calc" - do you mean that you don't shut down LO in between opening/editing/closing files ? I ask this because we need to have a reproducible scenario.

At present, if I open, edit and close a spreadsheet document, I can't reproduce the issue, so there is clearly something else, hence my question.

Please also provide the version of MacOS that you are using.

It would also be useful to have a sample spreadsheet, as we don't currently know which, if any, of the features of Calc you are using that might trigger this behaviour (e.g. automatically recalculated formulae, conditional formatting, charts, embedded drawings, etc). 

"Working with relatively small spreadsheets" simply isn't enough information for us to know how to reproduce the problem.

Setting to NEEDINFO pending requested information.
Comment 2 Alex Thurgood 2017-05-11 06:56:19 UTC
There have already been many reports on the users lists in the past (unfortunately not in the bugzilla, methinks) of LO consuming all resources when left running over several days.
Comment 3 dev 2017-05-11 18:15:20 UTC
I will setup a dedicated test machine to reproduce the issue.  Once I have been able to reliably reproduce on the test harness, I will provide the details of that environment along with a System Report.
Comment 4 QA Administrators 2017-12-04 12:45:17 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2018-01-02 10:18:02 UTC Comment hidden (obsolete)
Comment 6 Telesto 2018-05-16 18:35:36 UTC
Quote from Bug 116511 comment 10
(...) Anyway, I think that optimization is questionable, especially as the exact semantics of our horrible event loop API, like Application::AnyInput(), is under-defined and probably can and will change in various minor ways when people work on improving it on the Mac (and perhaps other platforms, too).

(The event loop etc certainly needs improvement on the Mac, the "WindowServer grows to tens of gigabytes when running make check" issue is related. Unfortunately nobody has come up with a simple fix for that yet, exactly because we use our event loop related APIs in so imaginative ways all over the code, and fixing one thing breaks another.) (...)