Bug 151730 - LO 7.3.6.2 gets stuck on macOS Ventura (context switching)
Summary: LO 7.3.6.2 gets stuck on macOS Ventura (context switching)
Status: RESOLVED DUPLICATE of bug 148435
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.6.2 release
Hardware: ARM All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2022-10-24 11:56 UTC by Matten
Modified: 2022-11-02 15:48 UTC (History)
1 user (show)

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 Matten 2022-10-24 11:56:45 UTC
Description:
After having run for a while LO 7.3.6.2 gets stuck and stops responding. This usually happens after a few hours, apparently mainly when LO is in the background. I have to 'Force Quit' the app and start it again.

I have not tried older releases.

Steps to Reproduce:
1. Start LO / Calc
2. Do some other work
3. Try to bring LO in the foreground

Actual Results:
LO does not respond any more

Expected Results:
LO can be brought in the foreground and use as usual or quit.


Reproducible: Always


User Profile Reset: No

Additional Info:
Observered since several beta versions of macOS 13.

Version: 7.3.6.2 / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 8; OS: Mac OS X 13.0; UI render: default; VCL: osx
Locale: en-US (en_CH.UTF-8); UI: en-US
Calc: threaded
Comment 1 lupurus 2022-10-27 08:38:49 UTC
I am using 7.4.2.3 and when switching between Writer windows, LO starts hanging and you have to force kill it.
Comment 2 lupurus 2022-10-28 08:16:38 UTC
To add some more infos: If I switch between the windows with the App Exposé gesture (three fingers down on the trackpad), there is no issue. Only then, when I switch with keyboard (I configured a keyboard shortcut in the settings for bringing the focus to the next window), I have the problem, that LO hangs.
Comment 3 Alex Thurgood 2022-10-28 08:55:55 UTC
@Matten & @lupurus :

Context switching is known to trigger a beachball hang response and/or crash.
It seems to be a VCL scheduling issue, and is as yet unresolved.
It appears to be exacerbated through the use of window managing software, such as Rectangle or BetterTool, but can also be triggered by macOS own native app switching management.

The problem appears to be more prevalent in Arm aarch64 versions of LibreOffice.

Could both of you provide the build architecture version of LibreOffice that you are using, either x86_64 (Intel version) or aarch64 (Mac Silicon version) ?

From the initial descriptions, this would appear to be a duplicate of bug 148435
Comment 4 Matten 2022-10-28 11:11:28 UTC
Hi Alex,

I see the issue on a Apple Silicon based Mac. I do the context switch just by clicking into the window of another app or via the dock.

Let me me whether stacktrace would help, I have send several reports to Apple, but I'm not sure you get these.
Comment 5 lupurus 2022-10-28 15:27:58 UTC
(In reply to Alex Thurgood from comment #3)
> Could both of you provide the build architecture version of LibreOffice that
> you are using, either x86_64 (Intel version) or aarch64 (Mac Silicon
> version) ?

I am using a Mac Silicon too (M2).
Comment 6 Alex Thurgood 2022-10-28 16:02:23 UTC
(In reply to Matten from comment #4)
> Hi Alex,
> 
> I see the issue on a Apple Silicon based Mac. I do the context switch just
> by clicking into the window of another app or via the dock.
> 
> Let me me whether stacktrace would help, I have send several reports to
> Apple, but I'm not sure you get these.


Hi Matten, thanks for your offer of a stacktrace. It would be useful, if only to see whether it is substantially the same as those produced in other similar bug reports, for example in bug 148435 (spindump), or bug 151726 (Apple stack trace I just uploaded).

I am not a developer, just a volunteer QA bug triager, who happens to use LO at work mainly on macOS machines. I certainly don't receive the Apple produced reports that are optionally sent to Apple when an app crashes. I'm not even sure that Apple passes these on to the LO development community.
Comment 7 Alex Thurgood 2022-10-28 16:05:47 UTC
(In reply to lupurus from comment #5)


> I am using a Mac Silicon too (M2).

Thanks !
Comment 8 Matten 2022-10-28 18:12:10 UTC
Hi Alex,

a simple context switch is certainly not enough to trigger the issue, it seems the app must have been in the background for quite a while. I will create a stacktrace when this happens the next time.
Comment 9 Alex Thurgood 2022-10-28 19:00:05 UTC
(In reply to Matten from comment #8)
> Hi Alex,
> 
> a simple context switch is certainly not enough to trigger the issue, it
> seems the app must have been in the background for quite a while. I will
> create a stacktrace when this happens the next time.

Hi Matten,

Yes, the traces in the other bug reports appear to show that triggering a redraw of a portion of the LO interface categorised as an idle thread causes a deadlock with other threads. The Visual Class Layer (vcl) is the very old abstraction layer built into LO and inherited from StarOffice onto which the Aqua UI framework (and indeed, all of the other UI frameworks) was bolted to enable the initial macOS port way back in the day before LibreOffice was even a twinkle in the community's eye.
Comment 10 Alex Thurgood 2022-10-28 19:05:31 UTC
I would add that if you look at comments 8, 13 and 28 of bug 148345, you can see that a commit has been identified as the likely culprit, but nothing has happened since it was bibisected.
Comment 11 Matten 2022-11-01 16:36:08 UTC
Interesting observation: in the last days I could not reproduce the issue. One difference to before: I don't have my external monitor connected, and the RC2 of macOS 13.0. I can only tests with my external monitor at the end of the week, early next week.
Comment 12 QA Administrators 2022-11-02 03:36:05 UTC Comment hidden (obsolete)
Comment 13 lupurus 2022-11-02 15:07:46 UTC
Steps to reproduce:

1) Create the keyboard shortcut for the focus to the next window in the macOS settings (settings > keyboard > keyboard shortcuts > keyboard > move focus to next window)

2) Open LO Writer

3) Open second window

4) Press the shortcut

5) Press the shortcut again. LO will hang.

------

Here is the stack trace:

--------------------------------------------------
Timeline format: stacks are sorted chronologically
Use -i and -heavy to re-report with count sorting
--------------------------------------------------


Heaviest stack for the main thread of the target process:
  24  start + 2432 (dyld + 25360) [0x200291310]
  24  main + 16 (soffice + 16224) [0x100259f60]
  24  soffice_main + 248 (libsofficeapp.dylib + 220008) [0x108b16b68]
  24  ImplSVMain() + 109 (libvcllo.dylib + 4338749) [0x1105c743d]
  24  AquaSalInstance::SVMainHook(int*) + 178 (libvclplug_osxlo.dylib + 157698) [0x1183d4802]
  24  NSApplicationMain + 817 (AppKit + 16472) [0x7ff812003058]
  24  -[NSApplication run] + 623 (AppKit + 196632) [0x7ff81202f018]
  24  -[NSApplication _handleEvent:] + 65 (AppKit + 4583433) [0x7ff81245e009]
  24  -[VCL_NSApplication sendEvent:] + 77 (libvclplug_osxlo.dylib + 377373) [0x11840a21d]
  24  AquaSalInstance::handleAppDefinedEvent(NSEvent*) + 92 (libvclplug_osxlo.dylib + 149388) [0x1183d278c]
  24  ImplSVMain() + 139 (libvcllo.dylib + 4338779) [0x1105c745b]
  24  desktop::Desktop::Main() + 4264 (libsofficeapp.dylib + 35464) [0x108ae9a88]
  24  Application::Execute() + 350 (libvcllo.dylib + 4308894) [0x1105bff9e]
  24  Application::Yield() + 69 (libvcllo.dylib + 4309077) [0x1105c0055]
  24  AquaSalInstance::DoYield(bool, bool) + 798 (libvclplug_osxlo.dylib + 151358) [0x1183d2f3e]
  24  AquaSalTimer::callTimerCallback() + 71 (libvclplug_osxlo.dylib + 210119) [0x1183e14c7]
  24  Scheduler::CallbackTaskScheduling() + 676 (libvcllo.dylib + 4244628) [0x1105b0494]
  24  AquaSalInstance::AnyInput(VclInputFlags) + 193 (libvclplug_osxlo.dylib + 152145) [0x1183d3251]
  24  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219 (AppKit + 252344) [0x7ff81203c9b8]
  24  _DPSNextEvent + 909 (AppKit + 256823) [0x7ff81203db37]
  24  _BlockUntilNextEventMatchingListInModeWithFilter + 70 (HIToolbox + 194339) [0x7ff818e07723]
  24  ReceiveNextEventCommon + 236 (HIToolbox + 194603) [0x7ff818e0782b]
  24  RunCurrentEventLoopInMode + 292 (HIToolbox + 195542) [0x7ff818e07bd6]
  24  CFRunLoopRunSpecific + 560 (CoreFoundation + 511647) [0x7ff80efdfe9f]
  24  __CFRunLoopRun + 929 (CoreFoundation + 514234) [0x7ff80efe08ba]
  24  __CFRunLoopDoBlocks + 404 (CoreFoundation + 518767) [0x7ff80efe1a6f]
  24  __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 (CoreFoundation + 518981) [0x7ff80efe1b45]
  24  ___NSMainRunLoopPerformBlockInModes_block_invoke + 25 (AppKit + 11826959) [0x7ff812b4670f]
  24  __80-[NSWMWindowCoordinator clientWindowManager:requestMakeKeyWindowWithIdentifier:]_block_invoke + 165 (AppKit + 11823283) [0x7ff812b458b3]
  24  -[NSWindow _changeKeyAndMainLimitedOK:] + 964 (AppKit + 1473347) [0x7ff812166b43]
  24  -[NSWindow resignKeyWindow] + 758 (AppKit + 1943773) [0x7ff8121d98dd]
  24  -[NSNotificationCenter postNotificationName:object:userInfo:] + 82 (Foundation + 40748) [0x7ff80fd1df2c]
  24  _CFXNotificationPost + 809 (CoreFoundation + 294497) [0x7ff80efaae61]
  24  _CFXRegistrationPost + 534 (CoreFoundation + 1104931) [0x7ff80f070c23]
  24  ___CFXRegistrationPost_block_invoke + 86 (CoreFoundation + 1105100) [0x7ff80f070ccc]
  24  __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137 (CoreFoundation + 476902) [0x7ff80efd76e6]
  24  -[SalFrameWindow windowDidResignKey:] + 199 (libvclplug_osxlo.dylib + 355527) [0x118404cc7]
  24  AquaSalFrame::SendPaintEvent(tools::Rectangle const*) + 461 (libvclplug_osxlo.dylib + 115725) [0x1183ca40d]
  24  ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) + 5045 (libvcllo.dylib + 1042101) [0x1102a26b5]
  24  vcl::Window::ImplInvalidateOverlapFrameRegion(vcl::Region const&) + 96 (libvcllo.dylib + 112688) [0x1101bf830]
  24  Idle::Start(bool) + 25 (libvcllo.dylib + 4005209) [0x110575d59]
  24  Task::Start(bool) + 41 (libvcllo.dylib + 4246281) [0x1105b0b09]
  24  std::__1::mutex::lock() + 9 (libc++.1.dylib + 54857) [0x7ff80ee65649]
  24  _pthread_mutex_firstfit_lock_slow + 212 (libsystem_pthread.dylib + 6600) [0x7ff80ef029c8]
  24  __psynch_mutexwait + 10 (libsystem_kernel.dylib + 14730) [0x7ff80eeca98a]
 *24  psynch_mtxcontinue + 0 (com.apple.kec.pthread + 9924) [0xfffffe000b126274]


....

  Thread 0xeaf6e    DispatchQueue "com.apple.main-thread"(1)    24 samples (1-24)    priority 47 (base 47)
  <process frontmost, thread QoS user interactive (requested user interactive, promote user interactive), process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  start + 2432 (dyld + 25360) [0x200291310] 1-24
    24  main + 16 (soffice + 16224) [0x100259f60] 1-24
      24  soffice_main + 248 (libsofficeapp.dylib + 220008) [0x108b16b68] 1-24
        24  ImplSVMain() + 109 (libvcllo.dylib + 4338749) [0x1105c743d] 1-24
          24  AquaSalInstance::SVMainHook(int*) + 178 (libvclplug_osxlo.dylib + 157698) [0x1183d4802] 1-24
            24  NSApplicationMain + 817 (AppKit + 16472) [0x7ff812003058] 1-24
              24  -[NSApplication run] + 623 (AppKit + 196632) [0x7ff81202f018] 1-24
                24  -[NSApplication _handleEvent:] + 65 (AppKit + 4583433) [0x7ff81245e009] 1-24
                  24  -[VCL_NSApplication sendEvent:] + 77 (libvclplug_osxlo.dylib + 377373) [0x11840a21d] 1-24
                    24  AquaSalInstance::handleAppDefinedEvent(NSEvent*) + 92 (libvclplug_osxlo.dylib + 149388) [0x1183d278c] 1-24
                      24  ImplSVMain() + 139 (libvcllo.dylib + 4338779) [0x1105c745b] 1-24
                        24  desktop::Desktop::Main() + 4264 (libsofficeapp.dylib + 35464) [0x108ae9a88] 1-24
                          24  Application::Execute() + 350 (libvcllo.dylib + 4308894) [0x1105bff9e] 1-24
                            24  Application::Yield() + 69 (libvcllo.dylib + 4309077) [0x1105c0055] 1-24
                              24  AquaSalInstance::DoYield(bool, bool) + 798 (libvclplug_osxlo.dylib + 151358) [0x1183d2f3e] 1-24
                                24  AquaSalTimer::callTimerCallback() + 71 (libvclplug_osxlo.dylib + 210119) [0x1183e14c7] 1-24
                                  24  Scheduler::CallbackTaskScheduling() + 676 (libvcllo.dylib + 4244628) [0x1105b0494] 1-24
                                    24  AquaSalInstance::AnyInput(VclInputFlags) + 193 (libvclplug_osxlo.dylib + 152145) [0x1183d3251] 1-24
                                      24  -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219 (AppKit + 252344) [0x7ff81203c9b8] 1-24
                                        24  _DPSNextEvent + 909 (AppKit + 256823) [0x7ff81203db37] 1-24
                                          24  _BlockUntilNextEventMatchingListInModeWithFilter + 70 (HIToolbox + 194339) [0x7ff818e07723] 1-24
                                            24  ReceiveNextEventCommon + 236 (HIToolbox + 194603) [0x7ff818e0782b] 1-24
                                              24  RunCurrentEventLoopInMode + 292 (HIToolbox + 195542) [0x7ff818e07bd6] 1-24
                                                24  CFRunLoopRunSpecific + 560 (CoreFoundation + 511647) [0x7ff80efdfe9f] 1-24
                                                  24  __CFRunLoopRun + 929 (CoreFoundation + 514234) [0x7ff80efe08ba] 1-24
                                                    24  __CFRunLoopDoBlocks + 404 (CoreFoundation + 518767) [0x7ff80efe1a6f] 1-24
                                                      24  __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 (CoreFoundation + 518981) [0x7ff80efe1b45] 1-24
                                                        24  ___NSMainRunLoopPerformBlockInModes_block_invoke + 25 (AppKit + 11826959) [0x7ff812b4670f] 1-24
                                                          24  __80-[NSWMWindowCoordinator clientWindowManager:requestMakeKeyWindowWithIdentifier:]_block_invoke + 165 (AppKit + 11823283) [0x7ff812b458b3] 1-24
                                                            24  -[NSWindow _changeKeyAndMainLimitedOK:] + 964 (AppKit + 1473347) [0x7ff812166b43] 1-24
                                                              24  -[NSWindow resignKeyWindow] + 758 (AppKit + 1943773) [0x7ff8121d98dd] 1-24
                                                                24  -[NSNotificationCenter postNotificationName:object:userInfo:] + 82 (Foundation + 40748) [0x7ff80fd1df2c] 1-24
                                                                  24  _CFXNotificationPost + 809 (CoreFoundation + 294497) [0x7ff80efaae61] 1-24
                                                                    24  _CFXRegistrationPost + 534 (CoreFoundation + 1104931) [0x7ff80f070c23] 1-24
                                                                      24  ___CFXRegistrationPost_block_invoke + 86 (CoreFoundation + 1105100) [0x7ff80f070ccc] 1-24
                                                                        24  __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137 (CoreFoundation + 476902) [0x7ff80efd76e6] 1-24
                                                                          24  -[SalFrameWindow windowDidResignKey:] + 199 (libvclplug_osxlo.dylib + 355527) [0x118404cc7] 1-24
                                                                            24  AquaSalFrame::SendPaintEvent(tools::Rectangle const*) + 461 (libvclplug_osxlo.dylib + 115725) [0x1183ca40d] 1-24
                                                                              24  ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) + 5045 (libvcllo.dylib + 1042101) [0x1102a26b5] 1-24
                                                                                24  vcl::Window::ImplInvalidateOverlapFrameRegion(vcl::Region const&) + 96 (libvcllo.dylib + 112688) [0x1101bf830] 1-24
                                                                                  24  Idle::Start(bool) + 25 (libvcllo.dylib + 4005209) [0x110575d59] 1-24
                                                                                    24  Task::Start(bool) + 41 (libvcllo.dylib + 4246281) [0x1105b0b09] 1-24
                                                                                      24  std::__1::mutex::lock() + 9 (libc++.1.dylib + 54857) [0x7ff80ee65649] 1-24
                                                                                        24  _pthread_mutex_firstfit_lock_slow + 212 (libsystem_pthread.dylib + 6600) [0x7ff80ef029c8] 1-24
                                                                                          24  __psynch_mutexwait + 10 (libsystem_kernel.dylib + 14730) [0x7ff80eeca98a] 1-24
                                                                                           *24  psynch_mtxcontinue + 0 (com.apple.kec.pthread + 9924) [0xfffffe000b126274] (blocked by turnstile waiting for this thread) 1-24

  Thread 0xeaf78    Thread name "com.apple.rosetta.exceptionserver"    24 samples (1-24)    priority 31 (base 31)
  <process frontmost, process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  <truncated backtrace> 1-24
    24  ??? (runtime + 18256) [0x7ff7ffc6a750] 1-24
     *24  ??? (kernel.release.t8112 + 217964) [0xfffffe000838d36c] 1-24

  Thread 0xeafb2    Thread name "PipeIPC"    24 samples (1-24)    priority 31 (base 31)
  <process frontmost, thread QoS default (requested default), process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  <truncated backtrace> 1-24
    24  __accept + 10 (libsystem_kernel.dylib + 33698) [0x7ff80eecf3a2] 1-24
     *24  ??? (kernel.release.t8112 + 30596) [0xfffffe000835f784] 1-24
       *24  ??? (kernel.release.t8112 + 1725548) [0xfffffe00084fd46c] 1-24
         *24  ??? (kernel.release.t8112 + 6966256) [0xfffffe00089fcbf0] 1-24
           *24  ??? (kernel.release.t8112 + 6183408) [0xfffffe000893d9f0] 1-24
             *24  ??? (kernel.release.t8112 + 5760428) [0xfffffe00088d65ac] 1-24
               *24  lck_mtx_sleep + 228 (kernel.release.t8112 + 479576) [0xfffffe00083cd158] 1-24
                 *24  ??? (kernel.release.t8112 + 573616) [0xfffffe00083e40b0] 1-24
                   *24  ??? (kernel.release.t8112 + 579892) [0xfffffe00083e5934] 1-24

  Thread 0xeafb9    Thread name "com.apple.NSEventThread"    24 samples (1-24)    priority 47 (base 47)    cpu time 0.027s (62.2M cycles, 20.6M instructions, 3.02c/i)
  <process frontmost, thread QoS user interactive (requested user interactive), process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  thread_start + 15 (libsystem_pthread.dylib + 7291) [0x7ff80ef02c7b] 1-24
    24  _pthread_start + 125 (libsystem_pthread.dylib + 25177) [0x7ff80ef07259] 1-24
      24  _NSEventThread + 132 (AppKit + 1697430) [0x7ff81219d696] 1-24
        24  CFRunLoopRunSpecific + 560 (CoreFoundation + 511647) [0x7ff80efdfe9f] 1-24
          24  __CFRunLoopRun + 1387 (CoreFoundation + 514692) [0x7ff80efe0a84] 1-24
            24  __CFRunLoopServiceMachPort + 145 (CoreFoundation + 520235) [0x7ff80efe202b] 1-24
              24  mach_msg + 19 (libsystem_kernel.dylib + 6537) [0x7ff80eec8989] 1-24
                24  mach_msg_overwrite + 723 (libsystem_kernel.dylib + 34586) [0x7ff80eecf71a] 1-24
                  24  mach_msg2_trap + 10 (libsystem_kernel.dylib + 5794) [0x7ff80eec86a2] 1-24
                   *24  ??? (kernel.release.t8112 + 217964) [0xfffffe000838d36c] 1-24

  Thread 0xeb03d    Thread name "GrammarCheckingIterator"    24 samples (1-24)    priority 31 (base 31)
  <process frontmost, thread QoS default (requested default), process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  thread_start + 15 (libsystem_pthread.dylib + 7291) [0x7ff80ef02c7b] 1-24
    24  _pthread_start + 125 (libsystem_pthread.dylib + 25177) [0x7ff80ef07259] 1-24
      24  osl_thread_start_Impl(void*) + 128 (libuno_sal.dylib.3 + 244208) [0x1088ef9f0] 1-24
        24  GrammarCheckingIterator::DequeueAndCheck() + 289 (liblnglo.dylib + 147105) [0x112bd8ea1] 1-24
          24  osl_waitCondition + 155 (libuno_sal.dylib.3 + 182427) [0x1088e089b] 1-24
            24  __psynch_cvwait + 10 (libsystem_kernel.dylib + 16894) [0x7ff80eecb1fe] 1-24
             *24  psynch_cvcontinue + 0 (com.apple.kec.pthread + 17920) [0xfffffe000b1281b0] 1-24

  Thread 0xeb19b    Thread name "UpdateCheckThread"    24 samples (1-24)    priority 31 (base 31)
  <process frontmost, thread QoS default (requested default), process unclamped, process received importance donation from WindowServer [162], IO tier 0>
  24  <truncated backtrace> 1-24
    24  __psynch_cvwait + 10 (libsystem_kernel.dylib + 16894) [0x7ff80eecb1fe] 1-24
     *24  psynch_cvcontinue + 0 (com.apple.kec.pthread + 17920) [0xfffffe000b1281b0] 1-24
Comment 14 Alex Thurgood 2022-11-02 15:48:16 UTC

*** This bug has been marked as a duplicate of bug 148435 ***