Bug 161879 - Calc freezes on Win 10 (Skia/Vulkan with NVIDIA GeForce GT 710)
Summary: Calc freezes on Win 10 (Skia/Vulkan with NVIDIA GeForce GT 710)
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Skia
  Show dependency treegraph
 
Reported: 2024-07-03 09:47 UTC by TTC
Modified: 2024-07-04 02:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Log file for Vulcan graphics engine - Win 10 (151 bytes, text/plain)
2024-07-03 12:21 UTC, TTC
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TTC 2024-07-03 09:47:53 UTC
Description:
Calc application freezes on Windows 10
Using 24.2.4.2

Steps to Reproduce:
1.Open Libra Calc
2.Work for a few mins
3.Application crashes

Actual Results:
1.Open Libra Calc
2.Work for a few mins
3 Save
4 Add a new Tab


Expected Results:
Application freezes


Reproducible: Always


User Profile Reset: No

Additional Info:
Not freeze
Comment 1 Buovjaga 2024-07-03 11:07:35 UTC
Please copy and paste here the contents of your Help - About by clicking the copy button. This allows us to know more about your system.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 2 TTC 2024-07-03 11:29:43 UTC
Help -> About

Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-IE (en_IE); UI: en-GB
Calc: CL threaded
Comment 3 Buovjaga 2024-07-03 11:40:15 UTC
Is it stable, if you deactivate this: Tools - Options - LibreOffice - View - Use Skia for all rendering
Comment 4 TTC 2024-07-03 11:54:16 UTC
deactivate / unchecked  : Tools - Options - LibreOffice - View - Use Skia for all rendering

Restarted & that seems better - so far did not freeze

Whats is the issue with Skia for Win 10 and what difference does it make when deactivated
Comment 5 Buovjaga 2024-07-03 11:58:32 UTC
Good to hear. You could attach this file found on your computer to this bug report (User in the path is your own Windows username):

C:\Users\User\AppData\Roaming\LibreOffice\4\cache\skia.log

Skia is a graphics engine:
https://en.wikipedia.org/wiki/Skia_Graphics_Engine

Unfortunately the Vulkan backend is not very stable. We might have to reconsider activating it by default.
Comment 6 Buovjaga 2024-07-03 12:20:51 UTC
Also of note: https://skia.org/docs/user/special/vulkan/
"At this time we find that many Vulkan drivers have bugs that Skia triggers for which we have no workaround. We are reporting bugs to vendors as we find them."
Comment 7 TTC 2024-07-03 12:21:47 UTC
Created attachment 195100 [details]
Log file for Vulcan graphics engine - Win 10

Log file for Vulcan graphics engine attached.

Thanks for your quick response
Comment 8 V Stuart Foote 2024-07-03 14:33:22 UTC
Please check, rather than disabling the Vulkan vector render engine--the issue with calc could equally be the GPUs OpenCL handling (also controlled by the GPU driver).

If you don't need OpenCL (really only for handling *large* spredsheets) I would disable that, and then see if your system is stable using calc with Vulkan rendering enabled.

The latest driver, 475.06 (2024.6.4) with API 1.2.275 support, listed for the Geforce GT 710 may not be the most stable to use for skia/Vulkan vector rendering as the hw is EOL. 

The same GPU driver also handles the skia rendering to raster frames, when Vulkan is disabled (by selecting the "Force Skia software rendering").  Raster based frame rendering is more efficient and less demanding than the vector rendering, but both use skia libs.

While for os/CPU controlled rendering, which is noticeably less performant, you'd uncheck both the "Use Skia for all rendering" and the "Force Skia software rendering" leaving just the "Use hardware acceleration" box checked.

So, please check if the OpenCL handling is really the issue, not skia/Vulkan vector rendering, and let us know.
Comment 9 TTC 2024-07-03 18:43:27 UTC
Ok - turned off GPUs OpenCL handling and turned back on Skia/Vulcan and restarted LibreOffice.
Opened Calc and not freezing.  Notice sometimes stalls for some time when switching tabs and eventually switches.
Comment 10 TTC 2024-07-03 18:48:35 UTC
Disabled Skia/Vulkan with OpenCL also disabled and lagging between tabs is gone. 
For now I will leave it like this
Comment 11 V Stuart Foote 2024-07-03 20:14:40 UTC
OK, so unclear if it is OpenCL issue, or a mix with Vulkan on this nVidia based GPU.

Either way, if it is working (more or less) with both disabled--we'll NAB this.

Only if you wanted to do more, we'd need stack trace with symbols to catch the hang/freeze of the offending call, and even then would likely just point into the nvogl64 driver calls rather than our skia/gdiimpl source. Requires setup of WinDbg and download of build symbols (LibreOffice and MS Windows--nVidia doesn't post the PDB symbols for their drivers). [1]

-=ref-=
[1] https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg
Comment 12 TTC 2024-07-03 20:23:20 UTC
My take is:
- with Skia/Vulkan deactiavted and OpenCL active Calc works ok

-  With Skia/Vulkan activated and OpenCL deactivated - still a stalling issue between tabs in Calc

- With Skia/Vulkan deactivated and OpenCL deactivated - Calc works ok


So I think the issue is Skia/Vulkan
Comment 13 ady 2024-07-03 21:25:58 UTC
If I may...

I would still get the impression that there is some issue, somewhere.

Even if there is nothing that LO's devs could do (on LO's code side), there seems to be something to improve, maybe about Skia, or maybe about OpenCL (or maybe about OpenGL, or...).

IDK whether LO devs report such potential issues upstream, at least with the intention of potential future improvements in performance for LO/Calc.
Comment 14 V Stuart Foote 2024-07-04 02:01:48 UTC
(In reply to ady from comment #13)
> If I may...
> 
> I would still get the impression that there is some issue, somewhere.
> 
> Even if there is nothing that LO's devs could do (on LO's code side), there
> seems to be something to improve, maybe about Skia, or maybe about OpenCL
> (or maybe about OpenGL, or...).
> 
> IDK whether LO devs report such potential issues upstream, at least with the
> intention of potential future improvements in performance for LO/Calc.

To what end? We have adopted a denylist approach for known bad/suboptimal GPU/driver parings to prevent use of skia/Vulkan rendering--thereby forcing those systems to use skia based raster graphics framing. 

While for macOS we don't provide Vulkan vector graphics as Apple does not support it (using a skia/Metal implementation instead but with no denylist mechanism).

We're treading water, and the GPU vendors don't help much by not releasing debug symbols (e.g. as PDB) for their driver source, meaning we can't really pursue anything "upstream".

We code to published API,  but specifics of Vulkan, or "legacy" OpenGL rendering (which has been stripped out of the LO code base) accelerated graphics is a quagmire with no active dev interest.