1

I'm looking for suggestions as to the cause / solution to a spinning beachball every time I try and copy/paste in Excel. This happens more on some spreadsheets, but is happening in one I use frequently which is only 700kb. I am using Office 365, and my MBP is 2018 (2.6 GHz i7, 32GB RAM), running Catalina. It does however seem independent of device, as I recreated it on my partners MacBook Air (2011, 2.0GHz i7, 8GB RAM) running High Sierra. The desired file is stored locally but mirrored in iCloud).

I am aware that was a problem in Office 2011 for Mac, but my online search hasn't found posts with this problem recently. I have tried an older suggested workaround of copy/pasting a blank cell in a blank spreadsheet before opening the desired file as suggested at Excel 2011 copy and paste beachball hang freeze issue

I have also tested with desired file mirrored on a different cloud, and also just saved locally without any cloud mirroring, - all have similar problems.

Thanks @pion for the specific detailed advice to capture what my system is doing when it happens. This is available at https://gist.github.com/KathParamedic/6b13f7556c76e8ba0255579e2f3322d6

Thanks in anticipation

1 Answer 1

0

The procedure for investigating a generic process hang when you have no other hints is to collect a symbolicated spindump of the system. What this does is take a bunch of freeze-frames of all user and system processes (including the kernel) for 10 seconds and shows you how much of that time is being spent in any given function call stack. By finding the stacks where a lot of time is being spent, you can usually get a good idea of where the slowness might be coming from and then focus your investigation on that. We collect a system-wide spindump rather than just the dump for a single process because it is common for system calls and/or interprocess communication to be involved in these sorts of hangs.

Here are the steps:

  1. Run the following Terminal command to enable kernel symbolication: sudo nvram boot-args="keepsyms=1". Make sure to copy-paste this so that you're entering straight quotes ("") rather than curly/“smart” quotes (“”) - it's a very subtle difference. (Important: If you get a permission error when doing this, you will first need to disable System Integrity Protection. You can re-enable it after you're done with this investigation.)
  2. Reboot your machine and don’t open any apps except for Terminal.
  3. In Terminal, enter the following command, press Return, type in your password, but do not press Return again yet: sudo spindump -reveal -noProcessingWhileSampling
  4. Open Excel and start your normal workflow. Continue until you start experiencing the beachball.
  5. As soon as you get the ball, go to the Terminal window where you entered your password and press Return so that the command begins to execute. Do not do anything else on the computer while it's running, otherwise you will distort the data collection.
  6. After waiting for >10 seconds to collect a sample and another minute or two to symbolicate and format, you’ll get a file in /tmp/spindump.txt that contains a stackshot of every process.
  7. Upload the file to PasteBin or some equivalent place and add the link to it to your original question.

UPDATE:

From your spindump capture, it strongly appears to be a problem with Excel itself: It seems to be handling the paste by going into multiple inner loops (which are opaque to us because we don't have debugging symbols for any Microsoft products), and while the main UI thread is burning cycles on these, the other worker threads are blocked until its completion. The beachball occurs due to the former.

Relevant excerpt from the spindump:

Process:          Microsoft Excel [691]
CPU Time:         9.999s (40.6G cycles, 124.0G instructions, 0.33c/i)

  Thread 0x1fd5    DispatchQueue "com.apple.main-thread"(1)    1000 samples (1-1000)    priority 46 (base 46)    cpu time 9.988s (40.6G cycles, 124.0G instructions, 0.33c/i)
  1000  start + 1 (libdyld.dylib + 109769) [0x7fff69c33cc9]
    1000  NSApplicationMain + 777 (AppKit + 14966) [0x7fff2cd5fa76]
      1000  -[NSApplication run] + 707 (AppKit + 203967) [0x7fff2cd8dcbf]
        1000  ??? (Microsoft Excel + 2353506) [0x107ada962]
          1000  ??? (mbukernel + 105487) [0x10db24c0f]
            1000  -[NSApplication(NSEvent) sendEvent:] + 2759 (AppKit + 1987803) [0x7fff2cf414db]
              1000  ??? (Microsoft Excel + 2947327) [0x107b6b8ff]
                1000  ??? (CocoaUI + 37299) [0x10bb691b3]
                  1000  -[NSWindow(NSEventRouting) sendEvent:] + 349 (AppKit + 1992681) [0x7fff2cf427e9]
                    1000  -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 6512 (AppKit + 1999741) [0x7fff2cf4437d]
                      1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                        1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                          1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                            1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                              1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                  1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                    1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                      1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                        1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                          1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                            1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                              1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                                1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                                  1000  -[NSView rightMouseDown:] + 156 (AppKit + 4715878) [0x7fff2d1db566]
                                                    1000  forwardMethod + 204 (AppKit + 2581241) [0x7fff2cfd22f9]
                                                      1000  ??? (Microsoft Excel + 22001429) [0x108d97715]
                                                        1000  ??? (Microsoft Excel + 22010463) [0x108d99a5f]
                                                          1000  ??? (Microsoft Excel + 32464327) [0x109791dc7]
                                                            1000  ??? (Microsoft Excel + 32475228) [0x10979485c]
                                                              1000  ??? (Microsoft Excel + 22957212) [0x108e80c9c]
                                                                1000  ??? (Microsoft Excel + 38434807) [0x109d437f7]
                                                                  1000  ??? (mso99 + 19508610) [0x110eced82]
                                                                    1000  ??? (mso99 + 19509057) [0x110ecef41]
                                                                      1000  ??? (mso99 + 17242835) [0x110ca5ad3]
                                                                        1000  OfficeSpace::FSControl::SetValue(void*, int, FlexUI::FlexValue*) + 1168 (mso99 + 1617714) [0x10fdbef32]
                                                                          1000  OfficeSpace::BaseControl::SetValue(void*, int, FlexUI::FlexValue*) + 209 (mso99 + 1618335) [0x10fdbf19f]
                                                                            1000  OfficeSpace::DataSource::SetValue(void*, int, FlexUI::FlexValue*) + 219 (mso99 + 1618825) [0x10fdbf389]
                                                                              1000  ??? (mso99 + 2049406) [0x10fe2857e]
                                                                                1000  TBCB::FExecute() + 207 (mso99 + 19078803) [0x110e65e93]
                                                                                  1000  ??? (Microsoft Excel + 22696804) [0x108e41364]
                                                                                    1000  ??? (Microsoft Excel + 784201) [0x10795b749]
                                                                                      1000  ??? (Microsoft Excel + 830344) [0x107966b88]
                                                                                        1000  ??? (Microsoft Excel + 28151338) [0x109374e2a]
                                                                                          1000  ??? (Microsoft Excel + 17515306) [0x10895032a]
                                                                                            1000  ??? (Microsoft Excel + 8664869) [0x1080df725]
                                                                                              1000  ??? (Microsoft Excel + 17318843) [0x1089203bb]
                                                                                                1000  ??? (Microsoft Excel + 17320609) [0x108920aa1]
                                                                                                  1000  ??? (Microsoft Excel + 17123887) [0x1088f0a2f]
                                                                                                    1000  ??? (Microsoft Excel + 17680883) [0x1089789f3]
                                                                                                      978  ??? (Microsoft Excel + 18542604) [0x108a4b00c]
                                                                                                        748  ??? (Microsoft Excel + 17687172) [0x10897a284]
                                                                                                          183  ??? (Microsoft Excel + 28078607) [0x10936320f]
                                                                                                            65   ??? (Microsoft Excel + 28078081) [0x109363001]
                                                                                                              28   ??? (Microsoft Excel + 29894536) [0x10951e788]
                                                                                                                11   ??? (Microsoft Excel + 401109) [0x1078fded5] (running)

[..SNIP..]

  Thread 0x2061,0x2066,0x2092,0x2095    DispatchQueue "com.apple.root.default-qos"(10)    4000 samples (1-1000)    priority 4-37 (base 4-37)
  4000  start_wqthread + 15 (libsystem_pthread.dylib + 7031) [0x7fff69e33b77]
    4000  _pthread_wqthread + 220 (libsystem_pthread.dylib + 10743) [0x7fff69e349f7]
      4000  _dispatch_worker_thread2 + 92 (libdispatch.dylib + 69783) [0x7fff69be9097]
        4000  _dispatch_root_queue_drain + 326 (libdispatch.dylib + 67927) [0x7fff69be8957]
          4000  _dispatch_queue_override_invoke + 763 (libdispatch.dylib + 17584) [0x7fff69bdc4b0]
            4000  _dispatch_client_callout + 8 (libdispatch.dylib + 9816) [0x7fff69bda658]
              4000  _dispatch_call_block_and_release + 12 (libdispatch.dylib + 5828) [0x7fff69bd96c4]
                4000  ??? (WLMKernel + 20262) [0x115009f26]
                  4000  ??? (mso20 + 12090) [0x10dd89f3a]
                    4000  Mso::Async::InvokeInCallbackContext(Mso::Functor<void ()>&&, Mso::Async::IDispatchQueue*, Mso::Async::Details::IIdleDispatchQueue*, bool) + 151 (mso20 + 12306) [0x10dd8a012]
                      2000  ??? (mso20 + 262665) [0x10ddc7209]
                        2000  ??? (mso30 + 206542) [0x10e48d6ce]
                          2000  ??? (mso30 + 206654) [0x10e48d73e]
                            2000  ??? (mso30 + 207281) [0x10e48d9b1]
                              1000  ??? (MicrosoftCSI + 151495) [0x10bee6fc7]
                                1000  Mso::Synchronization::MsoWaitForMultipleObjects(unsigned int, void* const*, bool, MsoTimeoutInterval const&, bool, bool) + 359 (mso20 + 339202) [0x10ddd9d02]
                                  1000  ??? (mso20 + 363129) [0x10dddfa79]
                                    1000  ??? (WLMKernel + 41663) [0x11500f2bf]
                                      1000  ??? (WLMKernel + 41855) [0x11500f37f]
                                        1000  ??? (WLMKernel + 42825) [0x11500f749]
                                          1000  ??? (WLMKernel + 57450) [0x11501306a]
                                            1000  MBUSignaledCondition::WaitForDuration(unsigned int) + 58 (mbukernel + 59154) [0x10db19712]
                                              1000  MBUCondition::WaitForDuration(unsigned int) + 25 (mbukernel + 59229) [0x10db1975d]
                                                1000  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff69d77882]
                                                 *1000  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]
                              1000  ??? (MicrosoftCSI + 33030) [0x10beca106]
                                1000  Mso::Synchronization::MsoWaitForMultipleObjects(unsigned int, void* const*, bool, MsoTimeoutInterval const&, bool, bool) + 241 (mso20 + 339084) [0x10ddd9c8c]
                                  1000  ??? (mso20 + 363129) [0x10dddfa79]
                                    1000  ??? (WLMKernel + 41663) [0x11500f2bf]
                                      1000  ??? (WLMKernel + 41855) [0x11500f37f]
                                        1000  ??? (WLMKernel + 42825) [0x11500f749]
                                          1000  ??? (WLMKernel + 57450) [0x11501306a]
                                            1000  MBUSignaledCondition::WaitForDuration(unsigned int) + 58 (mbukernel + 59154) [0x10db19712]
                                              1000  MBUCondition::WaitForDuration(unsigned int) + 25 (mbukernel + 59229) [0x10db1975d]
                                                1000  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff69d77882]
                                                 *1000  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]
                      2000  ??? (mso20 + 229524) [0x10ddbf094]
                        2000  WaitForSingleObject + 35 (WLMKernel + 69672) [0x115016028]
                          2000  ??? (WLMKernel + 41663) [0x11500f2bf]
                            2000  ??? (WLMKernel + 41855) [0x11500f37f]
                              2000  ??? (WLMKernel + 42825) [0x11500f749]
                                2000  ??? (WLMKernel + 57450) [0x11501306a]
                                  2000  MBUSignaledCondition::WaitForDuration(unsigned int) + 58 (mbukernel + 59154) [0x10db19712]
                                    2000  MBUCondition::WaitForDuration(unsigned int) + 25 (mbukernel + 59229) [0x10db1975d]
                                      2000  __psynch_cvwait + 10 (libsystem_kernel.dylib + 14466) [0x7fff69d77882]
                                       *2000  psynch_cvcontinue + 0 (pthread + 18722) [0xffffff7f82b41922]

The solution to this will likely involve fixing something on Microsoft's end. If this is still happening with the latest version of Excel and associated software, you should file a bug report.

2
  • I think a sample of Excel process would suffice. It's likely some internal lockup.
    – hym3242
    Commented Jun 5 at 7:56
  • Wild guess: circular formula reference that somehow didn't get detected by the code that's supposed to do so. Have you tried opening the spreadsheet with OpenOffice or LibreOffice?
    – WGroleau
    Commented Jun 5 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .